From 43e04cddc7dab50cfffa16926288a5e564058a58 Mon Sep 17 00:00:00 2001 From: OV2 Date: Sun, 1 Feb 2015 01:45:14 +0100 Subject: [PATCH] Win32: use SetWindowLongPtr instead of SetWindowLong (DaMan) --- win32/InputCustom.cpp | 2 +- win32/win32_display.cpp | 8 ++++---- win32/wsnes9x.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/win32/InputCustom.cpp b/win32/InputCustom.cpp index 39f2cc0c..2c0cd65c 100644 --- a/win32/InputCustom.cpp +++ b/win32/InputCustom.cpp @@ -838,7 +838,7 @@ InputCust * GetInputCustom(HWND hwnd) void SetInputCustom(HWND hwnd, InputCust *icp) { - SetWindowLong(hwnd, 0, (LONG)icp); + SetWindowLongPtr(hwnd, 0, (LONG)icp); } LRESULT InputCustom_OnPaint(InputCust *ccp, WPARAM wParam, LPARAM lParam) diff --git a/win32/win32_display.cpp b/win32/win32_display.cpp index 0bf3498b..0c75b4a8 100644 --- a/win32/win32_display.cpp +++ b/win32/win32_display.cpp @@ -586,13 +586,13 @@ void ToggleFullScreen () SaveMainWinPos(); if(GetMenu(GUI.hWnd)!=NULL) SetMenu(GUI.hWnd,NULL); - SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE); + SetWindowLongPtr (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE); hm = MonitorFromWindow(GUI.hWnd,MONITOR_DEFAULTTONEAREST); mi.cbSize = sizeof(mi); GetMonitorInfo(hm,&mi); SetWindowPos (GUI.hWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, SWP_DRAWFRAME|SWP_FRAMECHANGED); } else { - SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION| + SetWindowLongPtr( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION| WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX); SetMenu(GUI.hWnd,GUI.hMenu); SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_DRAWFRAME|SWP_FRAMECHANGED); @@ -604,13 +604,13 @@ void ToggleFullScreen () SaveMainWinPos(); if(GetMenu(GUI.hWnd)!=NULL) SetMenu(GUI.hWnd,NULL); - SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE); + SetWindowLongPtr (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE); SetWindowPos (GUI.hWnd, HWND_TOPMOST, 0, 0, GUI.FullscreenMode.width, GUI.FullscreenMode.height, SWP_DRAWFRAME|SWP_FRAMECHANGED); if(!S9xDisplayOutput->SetFullscreen(true)) GUI.FullScreen = false; } if(!GUI.FullScreen) { - SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION| + SetWindowLongPtr( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION| WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX); SetMenu(GUI.hWnd,GUI.hMenu); S9xDisplayOutput->SetFullscreen(false); diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 7568bcd7..3698c587 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -10080,9 +10080,9 @@ INT_PTR CALLBACK DlgCheatSearchAdd(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP memset(buf,0,sizeof(TCHAR) * 12); _stprintf(buf, TEXT("%u"), new_cheat->saved_val); SetDlgItemText(hDlg, IDC_NC_PREVVAL, buf); - SetWindowLong(GetDlgItem(hDlg, IDC_NC_NEWVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_NEWVAL),GWL_STYLE)); - SetWindowLong(GetDlgItem(hDlg, IDC_NC_CURRVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_CURRVAL),GWL_STYLE)); - SetWindowLong(GetDlgItem(hDlg, IDC_NC_PREVVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_PREVVAL),GWL_STYLE)); + SetWindowLongPtr(GetDlgItem(hDlg, IDC_NC_NEWVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_NEWVAL),GWL_STYLE)); + SetWindowLongPtr(GetDlgItem(hDlg, IDC_NC_CURRVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_CURRVAL),GWL_STYLE)); + SetWindowLongPtr(GetDlgItem(hDlg, IDC_NC_PREVVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_PREVVAL),GWL_STYLE)); if(new_cheat->size==1) { SendDlgItemMessage(hDlg, IDC_NC_CURRVAL,EM_SETLIMITTEXT, 3, 0);