积极答复者
Win7 VC++ 2008 环境下 Afxmessagebox 问题

问题
-
switch(PNum)
{
//公共点个数为0时,初始化转换参数为默认值
case 0:
AfxMessageBox(_T("请输入公共点参数!"),MB_OK);
m_Dx = 0.0;
m_Dy = 0.0;
m_Dh = 0.0;
m_T = 0.0;
m_K = 1.0;
break;以上代码编译为什么提示
1>c:\users\administrator\desktop\coord_trans\coord_trans\MainFrm.h(903) : error C2065: “MB_OK”: 未声明的标识符
1>c:\users\administrator\desktop\coord_trans\coord_trans\MainFrm.h(903) : error C3861: “AfxMessageBox”: 找不到标识符
1>c:\users\administrator\desktop\coord_trans\coord_trans\MainFrm.h(903) : error C3861: “_T”: 找不到标识符错误!急急急呀!
天道勤酬!- 已编辑 龙颖悟 2010年10月13日 4:23
答案
-
没包含MFC的头文件。
创建项目的时候没选支持MFC的模板的话,用支持MFC的模板重新创建项目。其他项目模板和MFC差别太大,要加MFC支持太麻烦。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 Daoping Liu - MSFTModerator 2010年10月15日 11:04
全部回复
-
没包含MFC的头文件。
创建项目的时候没选支持MFC的模板的话,用支持MFC的模板重新创建项目。其他项目模板和MFC差别太大,要加MFC支持太麻烦。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 Daoping Liu - MSFTModerator 2010年10月15日 11:04
-
这是正常的。用支持MFC的模板重新创建项目。CLR项目模板和MFC差别太大,要加MFC支持太麻烦。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP