在WIN32程序中 我们写的程序在VS2005中不分有两个版本?
字符集 分 两个种吗? 一个支持UNICODE编码 另一个是ACSII吗? 在函数中写字符 例如这个
wnd.hIcon=LoadIcon(0,IDI_MOUSEICON);
总报错 它说的错误是
:\dmvs2005\wnd\wnd\wnd.cpp(24) : error C2664: 'LoadIconA' : cannot convert parameter 2 from 'int' to 'LPCSTR'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
你换成另一个呢?
1>e:\dmvs2005\wnd\wnd\wnd.cpp(24) : error C2664: 'LoadIconW' : cannot convert parameter 2 from 'int' to 'LPCWSTR'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
我都郁闷拉
怎么办? MS 计算机 为什么没有一个统一的编码呢??
顺便告诉我怎么解决 是加_T 还是L 呢?
IDI_MOUSEICON 虽然 他们被定义拉 但是 .....
让程序员心烦呀 出学者闹心呀!
字符集 分 两个种吗? 一个支持UNICODE编码 另一个是ACSII吗? 在函数中写字符 例如这个
wnd.hIcon=LoadIcon(0,IDI_MOUSEICON);
总报错 它说的错误是
:\dmvs2005\wnd\wnd\wnd.cpp(24) : error C2664: 'LoadIconA' : cannot convert parameter 2 from 'int' to 'LPCSTR'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
你换成另一个呢?
1>e:\dmvs2005\wnd\wnd\wnd.cpp(24) : error C2664: 'LoadIconW' : cannot convert parameter 2 from 'int' to 'LPCWSTR'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
我都郁闷拉
怎么办? MS 计算机 为什么没有一个统一的编码呢??
顺便告诉我怎么解决 是加_T 还是L 呢?
IDI_MOUSEICON 虽然 他们被定义拉 但是 .....
让程序员心烦呀 出学者闹心呀!
LPCTSTR lpIconName
);你把IDI_MOUSEICON换成MAKEINTRESOURCE(IDI_MOUSEICON)试试
SDK原型是HICON LoadIcon(
HINSTANCE hInstance,
LPCTSTR lpIconName
);
int常量不能隐式转换到LPCTSTR。。
用MAKEINTRESOURCE(IDI_MOUSEICON)
我怎么没有看到背景图片呢?
我都修好拉 就想给你们发分的 呵呵
我今年心情很好的