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
return (DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADD),
m_parent, dlgProc, (LPARAM)this) != 0);
m_parent, (DLGPROC)dlgProc, (LPARAM)this) != 0);
}
CString

View File

@ -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

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -272,15 +272,15 @@ CMSWindowsClientTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
&CMSWindowsClientTaskBarReceiver::staticDlgProc,
(DLGPROC)&CMSWindowsClientTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(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);

View File

@ -300,15 +300,15 @@ CMSWindowsServerTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
&CMSWindowsServerTaskBarReceiver::staticDlgProc,
(DLGPROC)&CMSWindowsServerTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(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<CMSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(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<CMSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(data));

View File

@ -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<bool*>(arg) = true;