diff --git a/cmd/launcher/CAddScreen.cpp b/cmd/launcher/CAddScreen.cpp index bc65f283..5a876b77 100644 --- a/cmd/launcher/CAddScreen.cpp +++ b/cmd/launcher/CAddScreen.cpp @@ -70,7 +70,7 @@ CAddScreen::doModal() { // do dialog return (DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADD), - m_parent, dlgProc, (LPARAM)this) != 0); + m_parent, (DLGPROC)dlgProc, (LPARAM)this) != 0); } CString diff --git a/cmd/launcher/CAdvancedOptions.cpp b/cmd/launcher/CAdvancedOptions.cpp index ee5b45ea..c1ea83ef 100644 --- a/cmd/launcher/CAdvancedOptions.cpp +++ b/cmd/launcher/CAdvancedOptions.cpp @@ -54,7 +54,7 @@ CAdvancedOptions::doModal(bool isClient) // do dialog DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADVANCED_OPTIONS), - m_parent, dlgProc, (LPARAM)this); + m_parent, (DLGPROC)dlgProc, (LPARAM)this); } CString diff --git a/cmd/launcher/CAutoStart.cpp b/cmd/launcher/CAutoStart.cpp index 7b390a58..eb18a6b0 100644 --- a/cmd/launcher/CAutoStart.cpp +++ b/cmd/launcher/CAutoStart.cpp @@ -87,7 +87,7 @@ CAutoStart::doModal() // do dialog DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_AUTOSTART), - m_parent, dlgProc, (LPARAM)this); + m_parent, (DLGPROC)dlgProc, (LPARAM)this); // remove log outputter CLOG->pop_front(); diff --git a/cmd/launcher/CGlobalOptions.cpp b/cmd/launcher/CGlobalOptions.cpp index b7c15801..8237a07f 100644 --- a/cmd/launcher/CGlobalOptions.cpp +++ b/cmd/launcher/CGlobalOptions.cpp @@ -50,7 +50,7 @@ CGlobalOptions::doModal() { // do dialog DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_GLOBAL_OPTIONS), - m_parent, dlgProc, (LPARAM)this); + m_parent, (DLGPROC)dlgProc, (LPARAM)this); } void diff --git a/cmd/launcher/CHotkeyOptions.cpp b/cmd/launcher/CHotkeyOptions.cpp index 7e7a1b56..5b71d4ae 100644 --- a/cmd/launcher/CHotkeyOptions.cpp +++ b/cmd/launcher/CHotkeyOptions.cpp @@ -53,7 +53,7 @@ CHotkeyOptions::doModal() // do dialog m_inputFilter = m_config->getInputFilter(); DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_OPTIONS), - m_parent, dlgProc, (LPARAM)this); + m_parent, (DLGPROC)dlgProc, (LPARAM)this); } void diff --git a/cmd/launcher/CInfo.cpp b/cmd/launcher/CInfo.cpp index f2292db8..669da0e2 100644 --- a/cmd/launcher/CInfo.cpp +++ b/cmd/launcher/CInfo.cpp @@ -43,7 +43,7 @@ CInfo::doModal() { // do dialog DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_INFO), - m_parent, dlgProc, (LPARAM)this); + m_parent, (DLGPROC)dlgProc, (LPARAM)this); } void diff --git a/cmd/launcher/CScreensLinks.cpp b/cmd/launcher/CScreensLinks.cpp index dbbca67b..c7e58a04 100644 --- a/cmd/launcher/CScreensLinks.cpp +++ b/cmd/launcher/CScreensLinks.cpp @@ -59,7 +59,7 @@ CScreensLinks::doModal() { // do dialog DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_SCREENS_LINKS), - m_parent, dlgProc, (LPARAM)this); + m_parent, (DLGPROC)dlgProc, (LPARAM)this); } void diff --git a/cmd/launcher/launcher.cpp b/cmd/launcher/launcher.cpp index 07eab676..938822da 100644 --- a/cmd/launcher/launcher.cpp +++ b/cmd/launcher/launcher.cpp @@ -379,7 +379,7 @@ waitForChild(HWND hwnd, HANDLE thread, DWORD threadID) // do dialog that let's the user terminate the test DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_WAIT), hwnd, - waitDlgProc, (LPARAM)&info); + (DLGPROC)waitDlgProc, (LPARAM)&info); // force the waiter thread to finish and wait for it SetEvent(info.m_ready); diff --git a/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp b/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp index 5c31f4a5..c002b9f1 100644 --- a/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp +++ b/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp @@ -272,15 +272,15 @@ CMSWindowsClientTaskBarReceiver::createWindow() m_window = CreateDialogParam(m_appInstance, MAKEINTRESOURCE(IDD_TASKBAR_STATUS), NULL, - &CMSWindowsClientTaskBarReceiver::staticDlgProc, + (DLGPROC)&CMSWindowsClientTaskBarReceiver::staticDlgProc, reinterpret_cast( reinterpret_cast(this))); // window should appear on top of everything, including (especially) // the task bar. - DWORD style = GetWindowLong(m_window, GWL_EXSTYLE); + LONG_PTR style = GetWindowLongPtr(m_window, GWL_EXSTYLE); style |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST; - SetWindowLong(m_window, GWL_EXSTYLE, style); + SetWindowLongPtr(m_window, GWL_EXSTYLE, style); // tell the task bar about this dialog CArchTaskBarWindows::addDialog(m_window); diff --git a/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp b/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp index 21a61954..e332ccea 100644 --- a/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp +++ b/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp @@ -300,15 +300,15 @@ CMSWindowsServerTaskBarReceiver::createWindow() m_window = CreateDialogParam(m_appInstance, MAKEINTRESOURCE(IDD_TASKBAR_STATUS), NULL, - &CMSWindowsServerTaskBarReceiver::staticDlgProc, + (DLGPROC)&CMSWindowsServerTaskBarReceiver::staticDlgProc, reinterpret_cast( reinterpret_cast(this))); // window should appear on top of everything, including (especially) // the task bar. - DWORD style = GetWindowLong(m_window, GWL_EXSTYLE); + LONG_PTR style = GetWindowLongPtr(m_window, GWL_EXSTYLE); style |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST; - SetWindowLong(m_window, GWL_EXSTYLE, style); + SetWindowLongPtr(m_window, GWL_EXSTYLE, style); // tell the task bar about this dialog CArchTaskBarWindows::addDialog(m_window); @@ -353,11 +353,11 @@ CMSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd, if (msg == WM_INITDIALOG) { self = reinterpret_cast( reinterpret_cast(lParam)); - SetWindowLong(hwnd, GWL_USERDATA, lParam); + SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam); } else { // get the extra window data and forward the call - LONG data = GetWindowLong(hwnd, GWL_USERDATA); + LONG data = GetWindowLongPtr(hwnd, GWLP_USERDATA); if (data != 0) { self = reinterpret_cast( reinterpret_cast(data)); diff --git a/lib/platform/CMSWindowsScreenSaver.cpp b/lib/platform/CMSWindowsScreenSaver.cpp index 529cd176..7217338f 100644 --- a/lib/platform/CMSWindowsScreenSaver.cpp +++ b/lib/platform/CMSWindowsScreenSaver.cpp @@ -294,7 +294,7 @@ BOOL CALLBACK CMSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg) { if (IsWindowVisible(hwnd)) { - HINSTANCE instance = (HINSTANCE)GetWindowLong(hwnd, GWL_HINSTANCE); + HINSTANCE instance = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE); if (instance != CMSWindowsScreen::getInstance()) { PostMessage(hwnd, WM_CLOSE, 0, 0); *reinterpret_cast(arg) = true;