我想加一个简单的按钮
btn.Create("button",WS_CHILD|BS_DEFPUSHBUTTON,CRect(0,0,100,100),this,123);
btn.ShowWindow(SW_SHOWNORMAL);
这段代码在vc6里面可以正常编译运行,可是在vs2005里面会有错误
e:\学习\练习\test2\mainfrm.cpp(69) : error C2664: 'CButton::Create' : cannot convert parameter 1 from 'const char [7]' to 'LPCTSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast)
求教这是为什么啊?我刚刚开始学习vc,请各位大哥帮忙啊。
btn.Create("button",WS_CHILD|BS_DEFPUSHBUTTON,CRect(0,0,100,100),this,123);
btn.ShowWindow(SW_SHOWNORMAL);
这段代码在vc6里面可以正常编译运行,可是在vs2005里面会有错误
e:\学习\练习\test2\mainfrm.cpp(69) : error C2664: 'CButton::Create' : cannot convert parameter 1 from 'const char [7]' to 'LPCTSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast)
求教这是为什么啊?我刚刚开始学习vc,请各位大哥帮忙啊。
解决方案 »
- 关闭软件,如何保存数值?
- VC6 动态打开Access数据库???
- 小弟是新手,请问一下工具条的问题
- 程序窗口标题的问题:“无标题”+程序名。如何能变成:”打开文件名”+程序名。
- 各位大虾指点一下:
- 请教一个关于如何从消息队列中取出消息中的问题
- 基于SDI的单文档多视图怎么做?
- 我用kodak扫描控件,如何把扫描的图片放入kodak 的图象编辑软件 ,急!!!
- 〉〉〉〉在dll中使用MFC静态库的问题
- list contro如何l重新设置列数及列名?
- 大家帮忙想想修改了源地址的数据包有什么用?
- : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
这样看看~~~