BEGIN_MSG_MAP(CMainFrame)
MESSAGE_HANDLER(WM_Create, OnCreate)
CHAIN_MSG_MAP(CUpdateUI<CMainFrame>)
CHAIN_MSG_MAP(CFrameWindowImpl<CMainFrame>)
END_MSG_MAP()
BEGIN_MSG_MAP(CGameView)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_Create, OnCreate)
COMMAND_ID_HANDLER(ID_GAME_START_NEW, OnGameStartNew)
END_MSG_MAP()
// register object for message filtering and idle updates
CMessageLoop* pLoop = _Module.GetMessageLoop();
ATLASSERT(pLoop != NULL);
pLoop->AddMessageFilter(this);
class CGameView
: public CScrollWindowImpl<CGameView>
, public CMessageFilter
{
// ...
};
BEGIN_MSG_MAP(CMainFrame)
MESSAGE_HANDLER(WM_Create, OnCreate)
CHAIN_MSG_MAP(CUpdateUI<CMainFrame>)
CHAIN_MSG_MAP(CFrameWindowImpl<CMainFrame>)
CHAIN_MSG_MAP_MEMBER(m_view)
END_MSG_MAP()
BEGIN_MSG_MAP(CGameView)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_Create, OnCreate)
ALT_MSG_MAP(1) // Handle notify message.
COMMAND_ID_HANDLER(ID_GAME_START_NEW, OnGameStartNew)
END_MSG_MAP()
BEGIN_MSG_MAP(CMainFrame)
MESSAGE_HANDLER(WM_Create, OnCreate)
CHAIN_MSG_MAP(CUpdateUI<CMainFrame>)
CHAIN_MSG_MAP(CFrameWindowImpl<CMainFrame>)
CHAIN_MSG_MAP_ALT_MEMBER(m_view, 1)
END_MSG_MAP()
本文发布于:2024-02-04 07:11:07,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170701837153479.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |