- SetClassLong -> SetClassLongPtr, GetClassLong -> GetClassLongPtr (for 64-bit compatible, see note in MSDN)

Part 1/x

svn path=/trunk/; revision=40858
This commit is contained in:
Dmitry Chapyshev 2009-05-09 10:06:22 +00:00
parent 0b38772184
commit 4aee7436a3
3 changed files with 6 additions and 6 deletions

View file

@ -259,7 +259,7 @@ BackgroundWindow::BackgroundWindow(HWND hwnd)
{ {
// set background brush for the short moment of displaying the // set background brush for the short moment of displaying the
// background color while moving foreground windows // background color while moving foreground windows
SetClassLong(hwnd, GCL_HBRBACKGROUND, COLOR_BACKGROUND+1); SetClassLongPtr(hwnd, GCL_HBRBACKGROUND, COLOR_BACKGROUND+1);
_display_version = RegGetDWORDValue(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), TEXT("PaintDesktopVersion"), 1); _display_version = RegGetDWORDValue(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), TEXT("PaintDesktopVersion"), 1);
} }

View file

@ -109,7 +109,7 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs)
_hwndStartButton = hwndStart; _hwndStartButton = hwndStart;
// disable double clicks // disable double clicks
SetClassLong(hwndStart, GCL_STYLE, GetClassLong(hwndStart, GCL_STYLE) & ~CS_DBLCLKS); SetClassLongPtr(hwndStart, GCL_STYLE, GetClassLongPtr(hwndStart, GCL_STYLE) & ~CS_DBLCLKS);
// create task bar // create task bar
_hwndTaskBar = TaskBar::Create(_hwnd); _hwndTaskBar = TaskBar::Create(_hwnd);

View file

@ -333,10 +333,10 @@ HICON get_window_icon_small(HWND hwnd)
SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon) if (!hIcon)
hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM); hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
if (!hIcon) if (!hIcon)
hIcon = (HICON)GetClassLong(hwnd, GCL_HICON); hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
if (!hIcon) if (!hIcon)
SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon); SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon);
@ -358,10 +358,10 @@ HICON get_window_icon_big(HWND hwnd, bool allow_from_class)
if (allow_from_class) { if (allow_from_class) {
if (!hIcon) if (!hIcon)
hIcon = (HICON)GetClassLong(hwnd, GCL_HICON); hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
if (!hIcon) if (!hIcon)
hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM); hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
} }
if (!hIcon) if (!hIcon)