Sunday, April 19, 2009

[VC++] Expanding MFC macros

You may be seeing the MFC macros DECLARE_MESSAGE_MAP, BEGIN_MESSAGE_MAP etc from the day one you started using MFC. Have you ever thought of what goes inside these macros ?
Follow the below steps and you can see these macros expanded,
1. Select Project->Settings->Link tabs in the Visual Studio editor.
2. In the 'Project Options' edit box delete all the options and type /EP in it.
3. Now compile the file. You will see the expanded code in the output window.

No comments: