DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   one event handler function for a number of messages - MFC (http://www.daniweb.com/forums/thread164938.html)

GadiK Dec 30th, 2008 7:41 am
one event handler function for a number of messages - MFC
 
Hello,
I'm writing a GUI using MFC.
I have a number of press buttons that preform identical tasks on different members of an array.

I know how to make a handler function for each button.
I'm looking for a way to use the same function for all buttons
and within that function to use a SWITCH to distinguish between pressed buttons.

My question is, when using one function for a number of messages, how could I tell which button sent the message?
Is there some function that tells me the ID of the message sender?

Thank you.

GadiK Dec 31st, 2008 9:41 am
Re: one event handler function for a number of messages - MFC
 
well someone told me about this thread, that seems to work.
http://www.programmersheaven.com/mb/...tion/?S=B20000

Comatose Dec 31st, 2008 10:02 am
Re: one event handler function for a number of messages - MFC
 
Nice.


All times are GMT -4. The time now is 5:19 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC