Applied patch 1677756, win64 patch. This replaces calls to the

obsoleted {GS}etWindowsLong() with {GS}etWindowsLongPtr().  These
latter functions are supported from Win95 and WinNT 3.1 so they
shouldn't introduce any compatibility problems.
This commit is contained in:
crs23 2007-09-09 20:48:03 +00:00
parent 8896add372
commit d001ca488a
11 changed files with 17 additions and 17 deletions

View File

@ -70,7 +70,7 @@ CAddScreen::doModal()
{ {
// do dialog // do dialog
return (DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADD), return (DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADD),
m_parent, dlgProc, (LPARAM)this) != 0); m_parent, (DLGPROC)dlgProc, (LPARAM)this) != 0);
} }
CString CString

View File

@ -54,7 +54,7 @@ CAdvancedOptions::doModal(bool isClient)
// do dialog // do dialog
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADVANCED_OPTIONS), DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADVANCED_OPTIONS),
m_parent, dlgProc, (LPARAM)this); m_parent, (DLGPROC)dlgProc, (LPARAM)this);
} }
CString CString

View File

@ -87,7 +87,7 @@ CAutoStart::doModal()
// do dialog // do dialog
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_AUTOSTART), DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_AUTOSTART),
m_parent, dlgProc, (LPARAM)this); m_parent, (DLGPROC)dlgProc, (LPARAM)this);
// remove log outputter // remove log outputter
CLOG->pop_front(); CLOG->pop_front();

View File

@ -50,7 +50,7 @@ CGlobalOptions::doModal()
{ {
// do dialog // do dialog
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_GLOBAL_OPTIONS), DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_GLOBAL_OPTIONS),
m_parent, dlgProc, (LPARAM)this); m_parent, (DLGPROC)dlgProc, (LPARAM)this);
} }
void void

View File

@ -53,7 +53,7 @@ CHotkeyOptions::doModal()
// do dialog // do dialog
m_inputFilter = m_config->getInputFilter(); m_inputFilter = m_config->getInputFilter();
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_OPTIONS), DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_OPTIONS),
m_parent, dlgProc, (LPARAM)this); m_parent, (DLGPROC)dlgProc, (LPARAM)this);
} }
void void

View File

@ -43,7 +43,7 @@ CInfo::doModal()
{ {
// do dialog // do dialog
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_INFO), DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_INFO),
m_parent, dlgProc, (LPARAM)this); m_parent, (DLGPROC)dlgProc, (LPARAM)this);
} }
void void

View File

@ -59,7 +59,7 @@ CScreensLinks::doModal()
{ {
// do dialog // do dialog
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_SCREENS_LINKS), DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_SCREENS_LINKS),
m_parent, dlgProc, (LPARAM)this); m_parent, (DLGPROC)dlgProc, (LPARAM)this);
} }
void void

View File

@ -379,7 +379,7 @@ waitForChild(HWND hwnd, HANDLE thread, DWORD threadID)
// do dialog that let's the user terminate the test // do dialog that let's the user terminate the test
DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_WAIT), hwnd, DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_WAIT), hwnd,
waitDlgProc, (LPARAM)&info); (DLGPROC)waitDlgProc, (LPARAM)&info);
// force the waiter thread to finish and wait for it // force the waiter thread to finish and wait for it
SetEvent(info.m_ready); SetEvent(info.m_ready);

View File

@ -272,15 +272,15 @@ CMSWindowsClientTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance, m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS), MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL, NULL,
&CMSWindowsClientTaskBarReceiver::staticDlgProc, (DLGPROC)&CMSWindowsClientTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>( reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this))); reinterpret_cast<void*>(this)));
// window should appear on top of everything, including (especially) // window should appear on top of everything, including (especially)
// the task bar. // 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; 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 // tell the task bar about this dialog
CArchTaskBarWindows::addDialog(m_window); CArchTaskBarWindows::addDialog(m_window);

View File

@ -300,15 +300,15 @@ CMSWindowsServerTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance, m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS), MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL, NULL,
&CMSWindowsServerTaskBarReceiver::staticDlgProc, (DLGPROC)&CMSWindowsServerTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>( reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this))); reinterpret_cast<void*>(this)));
// window should appear on top of everything, including (especially) // window should appear on top of everything, including (especially)
// the task bar. // 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; 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 // tell the task bar about this dialog
CArchTaskBarWindows::addDialog(m_window); CArchTaskBarWindows::addDialog(m_window);
@ -353,11 +353,11 @@ CMSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
if (msg == WM_INITDIALOG) { if (msg == WM_INITDIALOG) {
self = reinterpret_cast<CMSWindowsServerTaskBarReceiver*>( self = reinterpret_cast<CMSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(lParam)); reinterpret_cast<void*>(lParam));
SetWindowLong(hwnd, GWL_USERDATA, lParam); SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
} }
else { else {
// get the extra window data and forward the call // get the extra window data and forward the call
LONG data = GetWindowLong(hwnd, GWL_USERDATA); LONG data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) { if (data != 0) {
self = reinterpret_cast<CMSWindowsServerTaskBarReceiver*>( self = reinterpret_cast<CMSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(data)); reinterpret_cast<void*>(data));

View File

@ -294,7 +294,7 @@ BOOL CALLBACK
CMSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg) CMSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg)
{ {
if (IsWindowVisible(hwnd)) { if (IsWindowVisible(hwnd)) {
HINSTANCE instance = (HINSTANCE)GetWindowLong(hwnd, GWL_HINSTANCE); HINSTANCE instance = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
if (instance != CMSWindowsScreen::getInstance()) { if (instance != CMSWindowsScreen::getInstance()) {
PostMessage(hwnd, WM_CLOSE, 0, 0); PostMessage(hwnd, WM_CLOSE, 0, 0);
*reinterpret_cast<bool*>(arg) = true; *reinterpret_cast<bool*>(arg) = true;