| | |
one event handler function for a number of messages - MFC
![]() |
•
•
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 binary bitmap business c++ c/c++ char class classes code coding commentinghelp compile console conversion count decide delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez graph guess gui homeworkhelp homeworkhelper iamthwee ifpug ifstream incrementoperators infinite input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem proficiency program programming project python random read recursion reference rpg string strings temperature template templates test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






