您的位置:首页 > 其它

MFC学习记录

2015-06-17 21:30 267 查看
错误:
error C2664: 'int CListCtrl::InsertColumn(int,LPCTSTR,int,int,int)' : cannot convert argument 2 from 'const char [3]' to 'LPCTSTR'
解决方法:
pList->InsertColumn(0, _T("工号"), 0, 100);
pList->InsertColumn(1, TEXT("姓名"), 0, 100);


问题:
IntelliSense: identifier "IDC_BUTTON4" is undefined
解决方案:
首先看看控件的ID是不是IDC_BUTTON4
如果是IDC_BUTTON4的话,再包含头文件resource.h


错误:
error C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
解决方法:
选项Project|Properties|C/C++|Preprocessor|Preprocessor Definitions
添加_CRT_SECURE_NO_DEPRECATE和_SCL_SECURE_NO_DEPRECATE
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: