vc 6.0 中wchar_t 的输出对应 TextOutW()非 TextOut()

来源:互联网 发布:华为大数据视频 百度云 编辑:程序博客网 时间:2024/06/08 15:00

TextOut()对应是的

#ifdef UNICODE
#define TextOut  TextOutW //国际化 wchar_t
#else
#define TextOut  TextOutA

vs 中TextOut()会自动选择

wchar_t text1[] = L"All our dreams can come true, if we have the courage to pursue them.中文";TextOutW(g_hdc,30,150,text1,wcslen(text1));

vc 中如果改用:

TextOut(g_hdc,30,150,text1,wcslen(text1));

会出现错误:

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast



原创粉丝点击