I have the same issue as in this question - the unicode characters from a resource file aren't displayed correctly (LTEXT L"żółć", - 1, 5, 5, 80, 10
results in ). However solutions in the answer to that question don't work for GCC, because 1) utf-16 doesn't work with GCC and 2) there's no
#pragma codepage
in GCC.
EDIT - minimal reproducible exmaple:
main.cpp
#include <windows.h>
INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
if(msg == WM_COMMAND && LOWORD(wparam) == IDCANCEL) {
EndDialog(hwnd, 0);
return TRUE;
} else {
return FALSE;
}
}
int WINAPI WinMain(HINSTANCE thisInstance, HINSTANCE, LPSTR, int) {
DialogBox(thisInstance, MAKEINTRESOURCE(123), nullptr, DialogProc);
return 0;
}
dialog.rc
#include <windows.h>
123 DIALOG 100, 100, 100, 100
STYLE WS_POPUPWINDOW | WS_CAPTION
{
LTEXT L"żółć", -1, 0, 0, 100, 100
}