I have a problem with unicode file names that appear in question marks in my fields.
When I insert Unicode characters in an edit box, such as Arabic or Thai, they are displayed correctly, but after running this code they become question marks. Why?
WCHAR buf[100]; GetWindowTextW(hWndEditBox, buf, 100); SetWindowTextW(hWndEditBox, buf);
Another thing is the ANSI project (we have code that cannot be ported, so the whole project remains ANSI), that is, the _UNICODE macro is undefined, but I explicitly use the Unicode version of the file names.
GetWindowText WM_GETTEXT (hWndEditBox). *A, *W ( , CreateWindowExA , ), , .
GetWindowText
WM_GETTEXT
hWndEditBox
*A
*W
CreateWindowExA
, , - , ANSI, , . , , (, ).
, GetWindowTextW SetWindowTextW, , - GetWindowTextW , , , .
GetWindowTextW
SetWindowTextW
, , . - Unicode.
: GetWindowText Raymond Chen .
SetWindowTextW() fooobar.com/questions/1791940/...: WM_SETTEXT DefWindowProcW() DefWindowProc().
SetWindowTextW()
WM_SETTEXT
DefWindowProcW()
DefWindowProc()
Source: https://habr.com/ru/post/1791937/More articles:Place an object on top of the stack in ILGenerator - c #first in the code of the entity structure, why the key is not unique - entity-frameworkHow to get network printers in ASP.NET - asp.netMySQLdb for Python - incompatible library version error? - pythonInstall j2me application on Samsung mobile phone - javaNHibernate: DetachedCriteria, nesting more than once - nhibernateASP.NET - What is the best practice for reading localized strings from an XML file? - c #SetWindowTextW in ANSI project - c ++Beginner Python. Is this Python code as efficient as possible? - pythonProcessing char as a byte in Java, different results - javaAll Articles