I wrote a small piece of code like this
// Handle = notepad
// set text to send
std::wstring message_to_send = L"xin chào bạn";
// send message
DWORD_PTR result;
SendMessageTimeoutW(Handle, WM_SETTEXT, (WPARAM)0, (LPARAM)message_to_send.c_str(), SMTO_ABORTIFHUNG, 1000, &result);
but the text pasted in notepad is not correct:
xin chà o bạn
Where did I go wrong, what do I need to do to fix this?
I try set the project setting Use Unicode Character Set
and file save as encoding UTF8
but it still error