Jump to content
  • Advertisement


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


MFC questions; Message Map and afx_msg type?

This topic is 5863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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...

[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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!