Solved

event message handlers ?

Posted on 2004-03-30
4
207 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

828 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