zoukankan      html  css  js  c++  java
  • error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'char *' to 'LPCTSTR'的解决方法

    我用的是VS2005,在编译MFC时遇到了如下错误:
    error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'char *' to 'LPCTSTR'
    后来发现解决方法很简单,点击“项目”-》“属性”-》“配置属性”-》“常规”-》“字符集”选择“使用多字节字符集”
    问题解决,后来发现很多问题都能通过这个办法解决,如:
    error C2440: '=' : cannot convert from 'const char [13]' to 'LPCWSTR'。
    等问题都能用该方法解决。
     
    vs 2010英文版下:
    Change your project configuration to use multibyte strings. Press ALT+F7 to open the properties, and navigate to Configuration Properties > General. Switch Character Set to "Use Multi-Byte Character Set".
  • 相关阅读:
    跳转
    登录
    计算器
    安卓作业
    第十三周作业
    第十三周上机练习
    第十二周作业
    第十二周上机作业
    第八周作业
    第七周作业
  • 原文地址:https://www.cnblogs.com/fag888/p/5789123.html
Copyright © 2011-2022 走看看