HWND hwnd = CreateWindowEx( 0, WC_LINK,
TEXT("For more information, <A HREF=\"e:\\OA\">click here</A> or <A ID=\"idInfo\">here</A>"),
WS_VISIBLE | WS_CHILD | WS_TABSTOP,
0, 0, 100, 100,
hwnd, (HMENU) (IDC_SYSLINK), NULL, NULL);error C2664: “CreateWindowExA”: 不能将参数 2 从“const wchar_t [8]”转换为“LPCSTR”
请问要如何改正?工程属性中字符集是使用多字节字符集。
TEXT("For more information, <A HREF=\"e:\\OA\">click here</A> or <A ID=\"idInfo\">here</A>"),
WS_VISIBLE | WS_CHILD | WS_TABSTOP,
0, 0, 100, 100,
hwnd, (HMENU) (IDC_SYSLINK), NULL, NULL);error C2664: “CreateWindowExA”: 不能将参数 2 从“const wchar_t [8]”转换为“LPCSTR”
请问要如何改正?工程属性中字符集是使用多字节字符集。
当前情况下你使用的CreateWindowEx是ANSI版本,
需要一个const char*类型的数据作为第二个参数.即WC_LINK,
但它被声明或定义为const wchar_t* 类型了.
估计是某个宏没用好
#define WC_LINK L""这样改
CreateWindowEx -> CreateWindowExW