|
-
May 10th, 1999, 03:37 PM
#1
get the window message?
Hi,
If I create a button dynamically with MFC like this:
RECT r;
r.bottom = 30;
r.left = 10;
r.right = 60;
r.top = 10;
pNewButton = new CButton;
pNewButton->Create("toto",WS_VISIBLE,r,AfxGetMainWnd(),1001);
and after when i click on the created button, I would like it show a message box. But I don't how to associate the click buttom message with the correct method of the created buttom.
Thanks
-
May 10th, 1999, 05:03 PM
#2
Re: get the window message?
U should create a CButton derived class for the new button and using Attach function the attach your new button to this CButton derived class.
eg. CMyButton btn;
btn.Attach(MyButtonHandle);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|