关于MFC的~~~~~~~~~~~~~~~~~~~~~急啊

来源:百度知道 编辑:UC知道 时间:2024/05/23 23:29:31
--------------------Configuration: Mine - Win32 Debug--------------------
Compiling...
MineDlg.cpp
E:\Programs\Mine\MineDlg.cpp(723) : error C2084: function 'const struct AFX_MSGMAP *__stdcall CMineDlg::_GetBaseMessageMap(void)' already has a body
E:\Programs\Mine\MineDlg.cpp(723) : error C2084: function 'const struct AFX_MSGMAP *__thiscall CMineDlg::GetMessageMap(void) const' already has a body
E:\Programs\Mine\MineDlg.cpp(723) : error C2374: 'protected: static struct AFX_MSGMAP const CMineDlg::messageMap' : redefinition; multiple initialization
e:\programs\mine\minedlg.h(116) : see declaration of 'protected: static struct AFX_MSGMAP const CMineDlg::messageMap'
E:\Programs\Mine\MineDlg.cpp(723) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Error executing cl.exe.

Mine.exe - 4 error(s), 0 warning(s)<

我觉得这个应该是头文件重复包含了,你去网上搜一下,有很多资料介绍解决头文件重复定义的。那个函数是系统定义的,所以你必须在自己的代码中包含它的头文件,才会出现头文件重复定义的问题。

_GetBaseMessageMap函数定义了两个,重复了