Fixed UTF-8 encoding for window title

This commit is contained in:
Samuel Yuan 2015-04-01 11:14:46 -04:00
parent 26afeaa478
commit 217122a40e
2 changed files with 7 additions and 0 deletions

View File

@ -1423,7 +1423,10 @@ int CALLBACK CCheats::ManageCheatsProc (HWND hDlg,DWORD uMsg,DWORD wParam, DWORD
WndPlac.length = sizeof(WndPlac);
GetWindowPlacement(hDlg, &WndPlac);
LONG_PTR originalWndProc = GetWindowLongPtrW(hDlg, GWLP_WNDPROC);
SetWindowLongPtrW(hDlg, GWLP_WNDPROC, (LONG_PTR) DefWindowProcW);
SetWindowTextW(hDlg, GS(CHEAT_TITLE));
SetWindowLongPtrW(hDlg, GWLP_WNDPROC, originalWndProc);
_this->m_hSelectCheat = (HWND)CreateDialogParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_Cheats_List),hDlg,(DLGPROC)CheatListProc,(LPARAM)_this);
SetWindowPos((HWND)_this->m_hSelectCheat,HWND_TOP, 5, 8, 0, 0, SWP_NOSIZE);
ShowWindow((HWND)_this->m_hSelectCheat,SW_SHOW);

View File

@ -53,7 +53,11 @@ DWORD CALLBACK RomInfoProc (HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) {
SetProp(hDlg,"this",(RomInformation *)lParam);
RomInformation * _this = (RomInformation *)lParam;
LONG_PTR originalWndProc = GetWindowLongPtrW(hDlg, GWLP_WNDPROC);
SetWindowLongPtrW(hDlg, GWLP_WNDPROC, (LONG_PTR) DefWindowProcW);
SetWindowTextW(hDlg, GS(INFO_TITLE));
SetWindowLongPtrW(hDlg, GWLP_WNDPROC, originalWndProc);
SetDlgItemTextW(hDlg, IDC_ROM_NAME, GS(INFO_ROM_NAME_TEXT));
SetDlgItemTextW(hDlg, IDC_FILE_NAME, GS(INFO_FILE_NAME_TEXT));
SetDlgItemTextW(hDlg, IDC_LOCATION, GS(INFO_LOCATION_TEXT));