Author: dchapyshev Date: Sat May 9 14:11:04 2009 New Revision: 40859
URL: http://svn.reactos.org/svn/reactos?rev=40859&view=rev Log: - SetClassLong -> SetClassLongPtr, GetClassLong -> GetClassLongPtr (for 64-bit compatible, see note in MSDN) Part 2/x
Modified: trunk/reactos/dll/win32/shimgvw/shimgvw.c trunk/reactos/dll/win32/user32/controls/edit.c trunk/reactos/dll/win32/user32/windows/defwnd.c trunk/reactos/dll/win32/user32/windows/mdi.c trunk/reactos/dll/win32/user32/windows/menu.c trunk/reactos/dll/win32/user32/windows/nonclient.c trunk/reactos/dll/win32/user32/windows/spy.c
Modified: trunk/reactos/dll/win32/shimgvw/shimgvw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shimgvw/shimgvw.c... ============================================================================== --- trunk/reactos/dll/win32/shimgvw/shimgvw.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shimgvw/shimgvw.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -292,7 +292,7 @@ WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
- SetClassLong(hDispWnd, GCL_STYLE, CS_HREDRAW | CS_VREDRAW); + SetClassLongPtr(hDispWnd, GCL_STYLE, CS_HREDRAW | CS_VREDRAW); PrevProc = (WNDPROC) SetWindowLong(hDispWnd, GWL_WNDPROC, (LPARAM) ImageView_DispWndProc);
ImageView_CreateToolBar(hwnd);
Modified: trunk/reactos/dll/win32/user32/controls/edit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/e... ============================================================================== --- trunk/reactos/dll/win32/user32/controls/edit.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/edit.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -4105,7 +4105,7 @@ #ifdef __REACTOS__ if (es->hwndParent && es->hwndParent != GetDesktopWindow()) { - if (GetClassLongW (es->hwndParent, GCW_ATOM) == (DWORD)MAKEINTATOM(32770)) + if (GetClassLongPtrW (es->hwndParent, GCW_ATOM) == (DWORD)MAKEINTATOM(32770)) return TRUE; } return FALSE;
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/de... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -224,7 +224,7 @@
case HTCLIENT: { - HICON hCursor = (HICON)GetClassLongW(hWnd, GCL_HCURSOR); + HICON hCursor = (HICON)GetClassLongPtrW(hWnd, GCL_HCURSOR); if (hCursor) { SetCursor(hCursor); @@ -554,7 +554,7 @@
if( iconic ) /* create a cursor for dragging */ { - HICON hIcon = (HICON)GetClassLongW(hwnd, GCL_HICON); + HICON hIcon = (HICON)GetClassLongPtrW(hwnd, GCL_HICON); if(!hIcon) hIcon = (HICON)SendMessageW( hwnd, WM_QUERYDRAGICON, 0, 0L); if( hIcon ) hDragCursor = CursorIconToCursor( hIcon, TRUE ); if( !hDragCursor ) iconic = FALSE; @@ -1181,7 +1181,7 @@ if((SystemMenu = GetSystemMenu(hWnd, FALSE))) { MenuInitSysMenuPopup(SystemMenu, GetWindowLongW(hWnd, GWL_STYLE), - GetClassLongW(hWnd, GCL_STYLE), HitCode); + GetClassLongPtrW(hWnd, GCL_STYLE), HitCode);
if(HitCode == HTCAPTION) Flags = TPM_LEFTBUTTON | TPM_RIGHTBUTTON; @@ -1224,7 +1224,7 @@ HICON hIcon;
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE && - (hIcon = (HICON)GetClassLongW(hWnd, GCL_HICON)) != NULL) + (hIcon = (HICON)GetClassLongPtrW(hWnd, GCL_HICON)) != NULL) { RECT ClientRect; INT x, y; @@ -1322,13 +1322,13 @@ case WM_ICONERASEBKGND: { RECT Rect; - HBRUSH hBrush = (HBRUSH)GetClassLongW(hWnd, GCL_HBRBACKGROUND); + HBRUSH hBrush = (HBRUSH)GetClassLongPtrW(hWnd, GCL_HBRBACKGROUND);
if (NULL == hBrush) { return 0; } - if (GetClassLongW(hWnd, GCL_STYLE) & CS_PARENTDC) + if (GetClassLongPtrW(hWnd, GCL_STYLE) & CS_PARENTDC) { /* can't use GetClipBox with a parent DC or we fill the whole parent */ GetClientRect(hWnd, &Rect); @@ -1410,7 +1410,7 @@
if (wParam == VK_F4) /* Try to close the window */ { - if (!(GetClassLongW(top, GCL_STYLE) & CS_NOCLOSE)) + if (!(GetClassLongPtrW(top, GCL_STYLE) & CS_NOCLOSE)) { if (bUnicode) PostMessageW(top, WM_SYSCOMMAND, SC_CLOSE, 0); @@ -1507,7 +1507,7 @@ UINT Len; HICON hIcon;
- hIcon = (HICON)GetClassLongW(hWnd, GCL_HICON); + hIcon = (HICON)GetClassLongPtrW(hWnd, GCL_HICON); if (hIcon) { return ((LRESULT)hIcon); @@ -1534,8 +1534,8 @@ case WM_SETICON: { INT Index = (wParam != 0) ? GCL_HICON : GCL_HICONSM; - HICON hOldIcon = (HICON)GetClassLongW(hWnd, Index); - SetClassLongW(hWnd, Index, lParam); + HICON hOldIcon = (HICON)GetClassLongPtrW(hWnd, Index); + SetClassLongPtrW(hWnd, Index, lParam); SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); @@ -1545,7 +1545,7 @@ case WM_GETICON: { INT Index = (wParam == ICON_BIG) ? GCL_HICON : GCL_HICONSM; - return (GetClassLongW(hWnd, Index)); + return (GetClassLongPtrW(hWnd, Index)); }
case WM_HELP:
Modified: trunk/reactos/dll/win32/user32/windows/mdi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/md... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/mdi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/mdi.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -235,7 +235,7 @@
static BOOL is_close_enabled(HWND hwnd, HMENU hSysMenu) { - if (GetClassLongW(hwnd, GCL_STYLE) & CS_NOCLOSE) return FALSE; + if (GetClassLongPtrW(hwnd, GCL_STYLE) & CS_NOCLOSE) return FALSE;
if (!hSysMenu) hSysMenu = GetSystemMenu(hwnd, FALSE); if (hSysMenu)
Modified: trunk/reactos/dll/win32/user32/windows/menu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/me... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -2216,7 +2216,7 @@ if (IS_SYSTEM_MENU(MenuInfo)) { MenuInitSysMenuPopup(ItemInfo.hSubMenu, GetWindowLongW(MenuInfo->Wnd, GWL_STYLE), - GetClassLongW(MenuInfo->Wnd, GCL_STYLE), HTSYSMENU); + GetClassLongPtrW(MenuInfo->Wnd, GCL_STYLE), HTSYSMENU);
NcGetSysPopupPos(MenuInfo->Wnd, &Rect); Rect.top = Rect.bottom;
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/no... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -134,10 +134,10 @@ SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
if (!hIcon) - hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM); + hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
if (!hIcon) - hIcon = (HICON)GetClassLong(hwnd, GCL_HICON); + hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
return hIcon; } @@ -499,7 +499,7 @@ DefWndNCCalcSize(HWND hWnd, BOOL CalcSizeStruct, RECT *Rect) { LRESULT Result = 0; - DWORD Style = GetClassLongW(hWnd, GCL_STYLE); + DWORD Style = GetClassLongPtrW(hWnd, GCL_STYLE); DWORD ExStyle; SIZE WindowBorders; RECT OrigRect;
Modified: trunk/reactos/dll/win32/user32/windows/spy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/sp... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] Sat May 9 14:11:04 2009 @@ -2010,7 +2010,7 @@ /* save and restore error code over the next call */ save_error = GetLastError(); /* special code to detect a property sheet dialog */ - if ((GetClassLongW(sp_e->msg_hwnd, GCW_ATOM) == (LONG)WC_DIALOG) && + if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (LONG)WC_DIALOG) && (GetPropW(sp_e->msg_hwnd, PropSheetInfoStr))) { strcpyW(sp_e->wnd_class, WC_PROPSHEETW); }