What encoding Win32 API functions expect?

前端 未结 2 1213
失恋的感觉
失恋的感觉 2021-01-18 17:50

For example, MessageBox function has LPCTSTR typed argument for text and caption, which is a pointer to char or pointer to wchar when _UNICODE or _MBCS are defined, respecti

2条回答
  •  迷失自我
    2021-01-18 18:03

    The ...A functions are obsolete and only wrap the ...W functions. The former were required for compatibility with Windows 9x, but since that is not used any more, you should avoid them at any costs and use the ...W functions exclusively. They require UTF-16 strings, the only native Windows encoding. All modern Windows versions should support non-BMP characters quite well (if there is a font that has these characters, of course).

提交回复
热议问题