关于 消息映射表中的消息映射宏
BEGIN_MESSAGE_MAP(CVc2View, CView)//{{AFX_MSG_MAP(CVc2View)
ON_WM_RBUTTONDOWN() //右击
ON_MESSAGE(WM_MYMESSAGE,OnMyMessage) //自定义的消息映射宏
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
F:\zhj\vc2\vc2View.cpp(24) : error C2059: syntax error : ';'
F:\zhj\vc2\vc2View.cpp(24) : error C2143: syntax error : missing ';' before ','
F:\zhj\vc2\vc2View.cpp(24) : error C2143: syntax error : missing ';' before '}'
F:\zhj\vc2\vc2View.cpp(24) : error C2143: syntax error : missing ';' before '}'
F:\zhj\vc2\vc2View.cpp(25) : error C2143: syntax error : missing ';' before '{'
F:\zhj\vc2\vc2View.cpp(25) : error C2447: missing function header (old-style formal list?)
F:\zhj\vc2\vc2View.cpp(25) : error C2143: syntax error : missing ';' before ','
F:\zhj\vc2\vc2View.cpp(28) : error C2143: syntax error : missing ';' before '{'
F:\zhj\vc2\vc2View.cpp(28) : error C2447: missing function header (old-style formal list?)
F:\zhj\vc2\vc2View.cpp(28) : error C2143: syntax error : missing ';' before ','
F:\zhj\vc2\vc2View.cpp(29) : error C2143: syntax error : missing ';' before '{'
F:\zhj\vc2\vc2View.cpp(29) : error C2447: missing function header (old-style formal list?)
F:\zhj\vc2\vc2View.cpp(29) : error C2143: syntax error : missing ';' before ','
F:\zhj\vc2\vc2View.cpp(30) : error C2143: syntax error : missing ';' before '{'
F:\zhj\vc2\vc2View.cpp(30) : error C2447: missing function header (old-style formal list?)
F:\zhj\vc2\vc2View.cpp(30) : error C2143: syntax error : missing ';' before ','
F:\zhj\vc2\vc2View.cpp(31) : error C2143: syntax error : missing ';' before '{'
F:\zhj\vc2\vc2View.cpp(31) : error C2447: missing function header (old-style formal list?)
F:\zhj\vc2\vc2View.cpp(31) : error C2143: syntax error : missing ';' before '}'
Error executing cl.exe.
都是关于分号的错,不知道为什么
新手提问
[[it] 本帖最后由 zhanghj 于 2008-7-29 17:39 编辑 [/it]]