Solved

event message handlers ?

Posted on 2004-03-30
4
206 Views
Last Modified: 2010-04-01
Hi,

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

meow.
0
Comment
Question by:meow00
4 Comments
 
LVL 14

Assisted Solution

by:wayside
wayside earned 50 total points
ID: 10715167
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
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 75 total points
ID: 10720059
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

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question