BEGIN_MESSAGE_MAP(CChat1Dlg, CDialog)
//{{AFX_MSG_MAP(CChat1Dlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BTN, OnBtnSend)
//}}AFX_MSG_MAP
ON_MESSAGE(WM_RECVDATA,OnRecvData)
END_MESSAGE_MAP()
添加函数映射后出现
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2059: syntax error : ';'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2143: syntax error : missing ';' before ','
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2143: syntax error : missing ';' before '}'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2143: syntax error : missing ';' before '}'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(94) : error C2143: syntax error : missing ';' before '{'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(94) : error C2447: missing function header (old-style formal list?)
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(94) : error C2143: syntax error : missing ';' before '}'
问题 不知道为什么 求高手 指教
//{{AFX_MSG_MAP(CChat1Dlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BTN, OnBtnSend)
//}}AFX_MSG_MAP
ON_MESSAGE(WM_RECVDATA,OnRecvData)
END_MESSAGE_MAP()
添加函数映射后出现
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2059: syntax error : ';'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2143: syntax error : missing ';' before ','
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2143: syntax error : missing ';' before '}'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(91) : error C2143: syntax error : missing ';' before '}'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(94) : error C2143: syntax error : missing ';' before '{'
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(94) : error C2447: missing function header (old-style formal list?)
D:\Microsoft Visual Studio\chat1\chat1Dlg.cpp(94) : error C2143: syntax error : missing ';' before '}'
问题 不知道为什么 求高手 指教
ON_MESSAGE(WM_RECVDATA,OnRecvData)
导致的1.检查头文件是否有错误,看看你的头文件中的大括号最后是否丢了";"
2.检查其代码中的其他部分,一般是chat1Dlg.cpp文件的0~90行有错误,要重点检查