class CMainWindow : public CFrameWnd
{
public:
CMainWindow ();
protected:
afx_msg void OnPaint ();
afx_msg int OnCreate(LPCREATESTRUCT);
afx_msg void OnLButtonDown(UINT,CPoint);
afx_msg void OnLButtonUp(UINT,CPoint);
afx_msg void OnRButtonDown(UINT,CPoint);
afx_msg void OnColor(UINT); DECLARE_MESSAGE_MAP ()};ON_COMMAND(ID_RED, *CMainWindow::OnColor(UINT))
ON_COMMAND(ID_GREEN,*CMainWindow::OnColor(UINT))
====================================================================
1>------ 已启动生成: 项目: mfc, 配置: Debug Win32 ------
1>正在编译...
1>1.cpp
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>c:\users\administrator\desktop\win32\1\1\1.cpp(49) : error C2275: “UINT”: 将此类型用作表达式非法
1> c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(173) : 参见“UINT”的声明
1>c:\users\administrator\desktop\win32\1\1\1.cpp(50) : error C2275: “UINT”: 将此类型用作表达式非法
1> c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(173) : 参见“UINT”的声明
1>生成日志保存在“file://c:\Users\Administrator\Desktop\WIN32\1\1\Debug\BuildLog.htm”
1>mfc - 2 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
{
public:
CMainWindow ();
protected:
afx_msg void OnPaint ();
afx_msg int OnCreate(LPCREATESTRUCT);
afx_msg void OnLButtonDown(UINT,CPoint);
afx_msg void OnLButtonUp(UINT,CPoint);
afx_msg void OnRButtonDown(UINT,CPoint);
afx_msg void OnColor(UINT); DECLARE_MESSAGE_MAP ()};ON_COMMAND(ID_RED, *CMainWindow::OnColor(UINT))
ON_COMMAND(ID_GREEN,*CMainWindow::OnColor(UINT))
====================================================================
1>------ 已启动生成: 项目: mfc, 配置: Debug Win32 ------
1>正在编译...
1>1.cpp
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>c:\users\administrator\desktop\win32\1\1\1.cpp(49) : error C2275: “UINT”: 将此类型用作表达式非法
1> c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(173) : 参见“UINT”的声明
1>c:\users\administrator\desktop\win32\1\1\1.cpp(50) : error C2275: “UINT”: 将此类型用作表达式非法
1> c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(173) : 参见“UINT”的声明
1>生成日志保存在“file://c:\Users\Administrator\Desktop\WIN32\1\1\Debug\BuildLog.htm”
1>mfc - 2 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
解决方案 »
- XP下VC60编写的应用程序外观,不能适应不同操作系统,比如按钮都是很丑的那种样式,怎么适应不同的操作系统?
- vs2008能生成但不能调试右键也没断点项
- 郁闷的xml文件格式
- 相对路径设置
- The validator XML Schema Validator is a deleageting validator but no delegate can found for it.
- 记录集为只读
- 关于对话框的问题
- 调用delphi写的DLL抛出异常访问异常,怎么解决?
- 急急,如何用ODBC动态连接access的方式下读取表里的图像?
- 大家快去抓电脑书籍!
- ON_COMMAND_RANGE 宏的前两个参数需要连续的起始范围
- link2001 错误,在线等,谢啦!!!
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_BUTTON1, &CMFCTestDlg::OnBnClickedButton1)
END_MESSAGE_MAP()afx_msg void OnBnClickedButton1();void CMFCTestDlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
}
===========
这个后面是不能加参数的,改成这样:
ON_COMMAND(ID_RED, *CMainWindow::OnColor)