event message handlers ?

Hi,

   What is "event message handler" ? and how is it related to afx_msg ? Thanks !

meow.
LVL 1
meow00Asked:
Who is Participating?
 
lakshman_ceConnect With a Mentor Commented:
The afx_msg keyword suggests the effect of the C++ virtual keyword by distinguishing the handlers from other CWnd member functions. Note, however, that these functions are not actually virtual; they are instead implemented through message maps. Message maps depend solely on standard preprocessor macros, not on any extensions to the C++ language. The afx_msg keyword resolves to white space after preprocessing.

You can Read more at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_handlers_for_standard_windows_messages.asp

-Lakshman
0
 
waysideConnect With a Mentor Commented:
An event message handler is a function that you write that gets calls in response to an input event by the user.

"afx_msg" is a convention used to identify those functions that are event handlers. It doesn't actually do anything.
0
All Courses

From novice to tech pro — start learning today.