943,786 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 444
  • C++ RSS
Dec 30th, 2008
0

one event handler function for a number of messages - MFC

Expand Post »
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.
Reputation Points: 18
Solved Threads: 0
Light Poster
GadiK is offline Offline
32 posts
since Dec 2008
Dec 31st, 2008
1

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
Reputation Points: 18
Solved Threads: 0
Light Poster
GadiK is offline Offline
32 posts
since Dec 2008
Dec 31st, 2008
0

Re: one event handler function for a number of messages - MFC

Nice.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Abstract Classes
Next Thread in C++ Forum Timeline: stdlib.h error?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC