C++ MFC

Moderators: Lundin
Number of threads: 3354
Number of posts: 9032

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: Dynamic Button Creation Posted by stober on 14 Jan 2004 at 6:54 AM
This message was edited by stober at 2004-1-14 6:54:50

: : You have to manually set up the message map for these OnButtonClick events. The following code allocates 10 buttons and uses the same event handler for each (see RED below
:
: Thats neat using the "ON_CONTROL_RANGE" message map Stober. How do you tell which button was clicked in the OnButton1() function?
:

call GetFocus() to get HWND, then GetDlgCtrlID() to get the ID.


Thread Tree
cherrym Dynamic Button Creation on 13 Jan 2004 at 2:34 PM
DB1 Re: Dynamic Button Creation on 13 Jan 2004 at 6:11 PM
stober Re: Dynamic Button Creation on 13 Jan 2004 at 7:21 PM
DB1 Re: Dynamic Button Creation on 14 Jan 2004 at 6:26 AM
stober Re: Dynamic Button Creation on 14 Jan 2004 at 6:54 AM
cherrym Re: Dynamic Button Creation on 14 Jan 2004 at 7:24 AM
DB1 Re: Dynamic Button Creation on 17 Jan 2004 at 7:38 PM
stober Re: Dynamic Button Creation on 17 Jan 2004 at 8:52 PM
DB1 Re: Dynamic Button Creation on 18 Jan 2004 at 6:40 AM
stober Re: Dynamic Button Creation on 18 Jan 2004 at 8:22 AM
Scott14468 Re: Dynamic Button Creation on 28 Jan 2011 at 10:01 AM
heroestr Re: Dynamic Button Creation on 31 Oct 2011 at 7:04 AM
heroestr Re: Dynamic Button Creation on 31 Oct 2011 at 7:13 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.