MFC消息映射宏的展开
BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)
ON_WM_PAINT () //WM_PAINT 消息通过MFC的消息映射机制转换为对CMainWindow::OnPaint函数的调用
END_MESSAGE_MAP ()
展开后
__pragma(warning(push))
__pragma(warning(disable : 4867))
const struct AFX_MSGMAP* CMainWindow::GetMessageMap() const
{
return GetThisMessageMap();
}
const struct AFX_MSGMAP* __stdcall CMainWindow::GetThisMessageMap()
{
typedef CMainWindow ThisClass;
typedef CFrameWnd TheBaseClass;
__pragma(warning(push))
__pragma(warning(disable: 4640))
static const struct AFX_MSGMAP_ENTRY _messageEntries[] =
{
WM_PAINT, 0, 0, 0, AfxSig_vv,
{(AFX_PMSG)(AFX_PMSGW)(static_cast<void (AFX_MSG_CALL CWnd::*)(void)> (&ThisClass::OnPaint))},
{0, 0, 0, 0, AfxSig_end, (AFX_PMSG)0 }
};
__pragma(warning(pop))
static const struct AFX_MSGMAP messageMap =
{
&TheBaseClass::GetThisMessageMap, &_messageRntries[0]
};
return &messageMap;
}
__pragma(warning(pop))