Archived

This topic is now archived and is closed to further replies.

En3my

MFC questions; Message Map and afx_msg type?

Recommended Posts

Hi, I recently begun with MFC programming, and I have two questions that hopefully the guru''s here at Gamedev can answer. First of all I wonder how the message map and the message macros really work. How does it work and look like behind the scenes so to speak? The other question I have is about the afx_msg placeholder type specification. What does prototyping a function as type afx_msg do? Thanks for sharing your knowledge!

Share this post


Link to post
Share on other sites
Here's a short answer (get 'Programming Windows with MFC' from Jeff Prosise - great book):
Message maps are faster than virtual functions. afx_msg is a construct which links a message map entry with a corresponding function.

Hope this helps a little bit...
Gero

[edited by - gerogerber on September 1, 2002 6:43:01 AM]

[edited by - gerogerber on September 1, 2002 6:46:08 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
MSVC comes with the sources to MFC. Search them. Search MSDN. Search Google.

Learning to find information on your own is invaluable. If you presented the macro code, even if you don''t understand it, then any C macro guru can explain it to you even if they''ve never studied MFC. By doing a little searching, you''ve widened your response pool.

I can''t remember the specifics. It''s bad C++, anyway.

Share this post


Link to post
Share on other sites