Purpose of afx_msg keyword? |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 17 August 2009 at 10:48am |
What's the purpose of afx_msg?
E.g.
afx_msg void OnPaint(); Is it merely there to make it easier for VC++ to add message-handlers? Is it even needed in VC++ 2008?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
ClassWizard requires that you use the afx_msg keyword in your message map handler declarations.
http://msdn.microsoft.com/en-us/library/0812b0wa(VS.80).aspx |
|
Codejock support
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Thanks! I've been looking for that article! :D
Finally I got the answer to why command-handlers are not simply virtual member functions:
"Due to the large number of messages involved, providing a separate virtual function for each Windows message results in a prohibitively large vtable."
|
|
PokerMemento - http://www.pokermemento.com/
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |