const AFX_MSGMAP* (PASCAL* pfnGetBaseMap)(); const AFX_MSGMAP_ENTRY* lpEntries; }; 这个相关结构就是 GetMessageMap 相关的主要数据 在OnPaint函数一般会调用 CPaintDC::~CPaintDC, 对话框还有 DrawIcon, 从这特征找到OnPaint, 然后找到 AFX_MSGMAP_ENTRY 搜索WM_COMMAND: 0x111, 一个地方数据出现多个, 也...
CFrameWnd* pMyFrame = (CFrameWnd*)pApp->m_pMainWnd;// output Message Map constructionAFX_MSGMAP* pMessageMap = pMyView->GetMessageMap();cout<<endl<<"CMyView Message Map : "<<endl; MsgMapPrinting(pMessageMap); pMessageMap = pMyDoc->GetMessageMap();cout<<endl<<"CMyDoc Message Map : "...
解释下BEGIN_MESSAGE_MAP宏展开后的理解#define BEGIN_MESSAGE_MAP(theClass,baseClass) \\x05const AFX_MSGMAP* theClass::GetMessageMap() const \\x05\x05{ return &theClass::messageMap; } \\x05AFX_COMDAT AFX_DATADEF const AFX_MSGMAP theClass::mess
CFrameWnd* pMyFrame = (CFrameWnd*)pApp->m_pMainWnd;// output Message Map constructionAFX_MSGMAP* pMessageMap = pMyView->GetMessageMap();cout<<endl<<"CMyView Message Map : "<<endl; MsgMapPrinting(pMessageMap); pMessageMap = pMyDoc->GetMessageMap();cout<<endl<<"CMyDoc Message Map : "...