| | |
one event handler function for a number of messages - MFC
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 24
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: 24
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 |
Tag cloud for C++
api application array arrays assignment based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






