mapping many control ID's to the same function 
Author Message
 mapping many control ID's to the same function

I have a dialog that contains 30 buttons.
Message BN_CLICKED is used for all buttons, but I would
like to write code for just one function, that should be
called when any button is pressed. This function should
receive a parameter that identify which button was
pressed.
How to do it ?
Thank's.


Sun, 11 Sep 2005 00:38:42 GMT  
 mapping many control ID's to the same function

Quote:
> I have a dialog that contains 30 buttons.
> Message BN_CLICKED is used for all buttons, but I would
> like to write code for just one function, that should be
> called when any button is pressed. This function should
> receive a parameter that identify which button was
> pressed.
> How to do it ?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcli...
_mfc_on_control_range.asp
--
Jeff Partch [VC++ MVP]


Sun, 11 Sep 2005 00:50:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Message Maps: COMMAND handler for multiple COMMAND ID's

2. Control's ID

3. Class Wizard - Missing Control ID's

4. Newbie - Control ID's not showing on member variables tab

5. Find a control type base on it's ID in dialogbox

6. Controls ID's in a CFileDialog

7. Control ID's in a CFileDialog

8. Control ID's

9. Resource ID doesn't associate with control

10. Hook/Callback funtion or Dialog Id/Control Id

11. Chicago Map's Precision Mapping OCX

12. stl::map - can't map int to char *

 

 
Powered by phpBB® Forum Software