Subclassing Window Question 
Author Message
 Subclassing Window Question


If you really want to intercept the WM_LBUTTONDOWN message, you're going to
have to subclass the button control(s).

On the other hand, if you just want to handle a button press, you can add
an ON_BN_CLICKED handler to your CView-derived class...

        ON_BN_CLICKED(IDC_PUSHBUTTON1, OnClickPushbutton1)

    void CMyView::OnClickPushbutton1()

Hope that helps

Scott Smith

> Question:

> I have a view window with some dynamically created button controls.  I
> would like the view window to intercept the WM_LBUTTONDOWN message that
> received by these controls.  Would subclassing the control windows take
> care of this?  

> Kristin McNally
> ColorByte Software

Sat, 06 Nov 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Subclassing window

2. Subclassing foreign window and changing memory in it

3. Subclassing a window in different process

4. Subclassing window

5. Subclassing Problem with Unicode Windows

6. Q: subclassing problem, with hook and windows messages

7. Problems subclassing a window

8. Subclassing Windows

9. Subclassing Windows class in MFC

10. Subclassing a window

11. Subclassing window

12. subclassing a MFC subclassed window


Powered by phpBB® Forum Software