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”: 找不到标识符

没包含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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值