| | |
one event handler function for a number of messages - MFC
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 22
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Dec 2008
Posts: 22
Reputation:
Solved Threads: 0
well someone told me about this thread, that seems to work.
http://www.programmersheaven.com/mb/...tion/?S=B20000
http://www.programmersheaven.com/mb/...tion/?S=B20000
![]() |
Other Threads in the C++ Forum
- Previous Thread: Abstract Classes
- Next Thread: stdlib.h error?
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






