I'm using the following to print a message in a Win32 API MessageBox
:
MessageBox(hWnd, TEXT("Já existe um controlador em execução"), TEXT("Erro"), 0);
MessageBox
is a macro and is expanding to MessageBoxW
. The trouble is that it doesn't print Unicode, whereas the window that calls it prints Unicode without any issue, it seems that this is a problem with MessageBox
itself.
Does anyone know how to solve this?
FYI, I also tried:
MessageBoxEx(hWnd, TEXT("Já existe um controlador em execução"), TEXT("Erro"), 0, MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE));
But it's the same, as expected.
Here is a picture of the call with the expansion:
And it prints:
Note that the main window menu has unicode characters that are printed correctly.