Create window using DialogBoxParamW

This commit is contained in:
toehead2001 2015-11-09 21:10:47 -07:00
parent 695ebfa9ad
commit 67bd22acc2
1 changed files with 1 additions and 4 deletions

View File

@ -149,7 +149,7 @@ void CMainGui::ChangeWinSize(long width, long height)
void CMainGui::AboutBox(void)
{
DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_About), m_hMainWindow, (DLGPROC)AboutBoxProc, (LPARAM)this);
DialogBoxParamW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_About), m_hMainWindow, (DLGPROC)AboutBoxProc, (LPARAM)this);
}
void CMainGui::AboutIniBox(void)
@ -984,10 +984,7 @@ DWORD CALLBACK AboutBoxProc(HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
case WM_INITDIALOG:
{
//Title
LONG_PTR originalWndProc = GetWindowLongPtrW(hWnd, GWLP_WNDPROC);
SetWindowLongPtrW(hWnd, GWLP_WNDPROC, (LONG_PTR)DefWindowProcW);
SetWindowTextW(hWnd, GS(PLUG_ABOUT));
SetWindowLongPtrW(hWnd, GWLP_WNDPROC, originalWndProc);
// Use the size of the image
hbmpBackgroundTop = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_ABOUT_LOGO));