- SetWindowLong -> SetWindowLongPtr, GetWindowLong -> GetWindowLongPtr (for 64-bit...
authorDmitry Chapyshev <dmitry@reactos.org>
Sat, 9 May 2009 12:18:13 +0000 (12:18 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Sat, 9 May 2009 12:18:13 +0000 (12:18 +0000)
Part 3/x

svn path=/trunk/; revision=40863

21 files changed:
reactos/base/applications/calc/winmain.c
reactos/base/applications/games/solitaire/cardlib/cardwindow.cpp
reactos/base/applications/mscutils/servman/listview.c
reactos/base/applications/mstsc/win32.c
reactos/base/applications/network/telnet/src/tnmisc.cpp
reactos/base/applications/regedit/find.c
reactos/base/applications/regedit/hexedit.c
reactos/base/applications/taskmgr/applpage.c
reactos/base/applications/taskmgr/graph.c
reactos/base/applications/taskmgr/optnmenu.c
reactos/base/applications/taskmgr/taskmgr.c
reactos/base/setup/reactos/reactos.c
reactos/base/setup/vmwinst/vmwinst.c
reactos/base/setup/welcome/welcome.c
reactos/base/shell/explorer-new/explorer.c
reactos/base/shell/explorer-new/taskswnd.c
reactos/base/shell/explorer-new/trayntfy.c
reactos/base/shell/explorer-new/traywnd.c
reactos/base/shell/explorer/dialogs/settings.cpp
reactos/base/shell/explorer/utility/utility.h
reactos/base/shell/explorer/utility/window.cpp

index 1330ef4..40a3468 100644 (file)
@@ -302,7 +302,7 @@ static LRESULT post_key_press(LPARAM lParam, WORD idc)
         return 1;
 
     if (!_tcscmp(ClassName, TEXT("Button"))) {
-        DWORD dwStyle = GetWindowLong(hCtlWnd, GWL_STYLE) & 0xF;
+        DWORD dwStyle = GetWindowLongPtr(hCtlWnd, GWL_STYLE) & 0xF;
 
         /* Set states for press/release, but only for push buttons */
         if (dwStyle == BS_PUSHBUTTON || dwStyle == BS_DEFPUSHBUTTON || dwStyle == BS_OWNERDRAW) {
@@ -1136,7 +1136,7 @@ static void handle_context_menu(HWND hWnd, WPARAM wp, LPARAM lp)
         popup.rcMargins.bottom = -1;
         popup.rcMargins.left   = -1;
         popup.rcMargins.right  = -1;
-        popup.idString = GetWindowLong((HWND)wp, GWL_ID);
+        popup.idString = GetWindowLongPtr((HWND)wp, GWL_ID);
         HtmlHelp((HWND)wp, HTMLHELP_PATH("/popups.txt"), HH_DISPLAY_TEXT_POPUP, (DWORD_PTR)&popup);
     }
 #endif
index 3b01a0b..cb03193 100644 (file)
@@ -275,7 +275,7 @@ CardRegion* CardWindow::CardRegionFromPoint(int x, int y)
 //
 LRESULT CALLBACK CardWindow::CardWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
-    CardWindow *cw = (CardWindow *)GetWindowLong(hwnd, 0);
+    CardWindow *cw = (CardWindow *)GetWindowLongPtr(hwnd, 0);
     return cw->WndProc(hwnd, iMsg, wParam, lParam);
 }
 
@@ -366,7 +366,7 @@ LRESULT CALLBACK CardWindow::WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM
         //
         // associate this class with the window
         //
-        SetWindowLong(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
+        SetWindowLongPtr(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
 
         return 1;
 
index ba1d689..5eb910f 100644 (file)
@@ -14,13 +14,13 @@ VOID
 SetListViewStyle(HWND hListView,\r
                  DWORD View)\r
 {\r
-    DWORD Style = GetWindowLong(hListView, GWL_STYLE);\r
+    DWORD Style = GetWindowLongPtr(hListView, GWL_STYLE);\r
 \r
     if ((Style & LVS_TYPEMASK) != View)\r
     {\r
-        SetWindowLong(hListView,\r
-                      GWL_STYLE,\r
-                      (Style & ~LVS_TYPEMASK) | View);\r
+        SetWindowLongPtr(hListView,\r
+                         GWL_STYLE,\r
+                         (Style & ~LVS_TYPEMASK) | View);\r
     }\r
 }\r
 \r
index 49ce26d..6f39ad8 100644 (file)
@@ -520,11 +520,11 @@ handle_WM_SIZING(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
   height = (prect->bottom - prect->top) - (g_yoff + g_xoff);
   if (height < g_height || width < g_width)
   {
-    style = GetWindowLong(g_Wnd, GWL_STYLE);
+    style = GetWindowLongPtr(g_Wnd, GWL_STYLE);
     if (!(style & WS_HSCROLL))
     {
       style |= WS_HSCROLL | WS_VSCROLL;
-      SetWindowLong(g_Wnd, GWL_STYLE, style);
+      SetWindowLongPtr(g_Wnd, GWL_STYLE, style);
       g_xscroll = 0;
       g_yscroll = 0;
       SetScrollPos(g_Wnd, SB_HORZ, g_xscroll, 1);
@@ -533,12 +533,12 @@ handle_WM_SIZING(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
   }
   else if (height >= g_height && width >= g_width)
   {
-    style = GetWindowLong(g_Wnd, GWL_STYLE);
+    style = GetWindowLongPtr(g_Wnd, GWL_STYLE);
     if (style & WS_HSCROLL)
     {
       style &= ~WS_HSCROLL;
       style &= ~WS_VSCROLL;
-      SetWindowLong(g_Wnd, GWL_STYLE, style);
+      SetWindowLongPtr(g_Wnd, GWL_STYLE, style);
       g_xscroll = 0;
       g_yscroll = 0;
     }
index 51a2024..e3fa27e 100644 (file)
@@ -152,7 +152,7 @@ bool SetIcon(HWND hConsoleWindow, HANDLE hIcon, LPARAM *pOldBIcon, LPARAM *pOldS
 #else
        // load the icon from the resource file -crn@ozemail.com.au 16/12/98
        if(!hIcon) {
-               hIcon = LoadIcon ((HANDLE)GetWindowLong(hConsoleWindow,
+               hIcon = LoadIcon ((HANDLE)GetWindowLongPtr(hConsoleWindow,
                        GWL_HINSTANCE), "TELNETICON");
        }
 #endif
index b576444..8a2f052 100644 (file)
@@ -192,16 +192,16 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
             hControl = GetDlgItem(hDlg, IDC_LOOKAT_VALUES);
             if (hControl)
             {
-                lStyle = GetWindowLong(hControl, GWL_STYLE);
-                SetWindowLong(hControl, GWL_STYLE, lStyle | WS_DISABLED);
+                lStyle = GetWindowLongPtr(hControl, GWL_STYLE);
+                SetWindowLongPtr(hControl, GWL_STYLE, lStyle | WS_DISABLED);
             }
 
             /* Looking at data is not yet implemented */
             hControl = GetDlgItem(hDlg, IDC_LOOKAT_DATA);
             if (hControl)
             {
-                lStyle = GetWindowLong(hControl, GWL_STYLE);
-                SetWindowLong(hControl, GWL_STYLE, lStyle | WS_DISABLED);
+                lStyle = GetWindowLongPtr(hControl, GWL_STYLE);
+                SetWindowLongPtr(hControl, GWL_STYLE, lStyle | WS_DISABLED);
             }
 
             /* Match whole string */
@@ -278,12 +278,12 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
                             hControl = GetDlgItem(hDlg, IDOK);
                             if (hControl)
                             {
-                                lStyle = GetWindowLong(hControl, GWL_STYLE);
+                                lStyle = GetWindowLongPtr(hControl, GWL_STYLE);
                                 if (s_szSavedFindValue[0])
                                     lStyle &= ~WS_DISABLED;
                                 else
                                     lStyle |= WS_DISABLED;
-                                SetWindowLong(hControl, GWL_STYLE, lStyle);
+                                SetWindowLongPtr(hControl, GWL_STYLE, lStyle);
                                 RedrawWindow(hControl, NULL, NULL, RDW_INVALIDATE);
                             }
                             break;
index 60d1cf3..98d2e34 100644 (file)
@@ -126,7 +126,7 @@ HEXEDIT_Update(PHEXEDIT_DATA hed)
   INT bufsize, cvislines;
 
   GetClientRect(hed->hWndSelf, &rcClient);
-  hed->style = GetWindowLong(hed->hWndSelf, GWL_STYLE);
+  hed->style = GetWindowLongPtr(hed->hWndSelf, GWL_STYLE);
 
   bufsize = (hed->hBuffer ? (INT) LocalSize(hed->hBuffer) : 0);
   hed->nLines = max(bufsize / hed->ColumnsPerLine, 1);
index 7f103ab..2f0aff1 100644 (file)
@@ -220,7 +220,7 @@ void RefreshApplicationPage(void)
 
 void UpdateApplicationListControlViewSetting(void)
 {
-    DWORD  dwStyle = GetWindowLongW(hApplicationPageListCtrl, GWL_STYLE);
+    DWORD  dwStyle = GetWindowLongPtrW(hApplicationPageListCtrl, GWL_STYLE);
 
     dwStyle &= ~(LVS_REPORT | LVS_ICON | LVS_LIST | LVS_SMALLICON);
 
@@ -229,7 +229,7 @@ void UpdateApplicationListControlViewSetting(void)
     case ID_VIEW_SMALL:   dwStyle |= LVS_SMALLICON; break;
     case ID_VIEW_DETAILS: dwStyle |= LVS_REPORT; break;
     }
-    SetWindowLongW(hApplicationPageListCtrl, GWL_STYLE, dwStyle);
+    SetWindowLongPtrW(hApplicationPageListCtrl, GWL_STYLE, dwStyle);
 
     RefreshApplicationPage();
 }
@@ -298,7 +298,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
         !IsWindowVisible(hWnd) ||
         (GetParent(hWnd) != NULL) ||
         (GetWindow(hWnd, GW_OWNER) != NULL) ||
-        (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+        (GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
     {
         return TRUE; /* Skip this window */
     }
@@ -422,7 +422,7 @@ void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
             !IsWindowVisible(pAPLI->hWnd) ||
             (GetParent(pAPLI->hWnd) != NULL) ||
             (GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
-            (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+            (GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
         {
             ImageList_Remove(hImageListLarge, item.iItem);
             ImageList_Remove(hImageListSmall, item.iItem);
index 6219497..2a978f9 100644 (file)
@@ -102,7 +102,7 @@ Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
         hdc = BeginPaint(hWnd, &ps);
 
-        WindowId = GetWindowLongW(hWnd, GWL_ID);
+        WindowId = GetWindowLongPtrW(hWnd, GWL_ID);
 
         switch (WindowId)
         {
index c82d4b8..6b7c28f 100644 (file)
@@ -40,7 +40,7 @@ void TaskManager_OnOptionsAlwaysOnTop(void)
      * Check or uncheck the always on top menu item
      * and update main window.
      */
-    if ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0)
+    if ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0)
     {
         CheckMenuItem(hOptionsMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND|MF_UNCHECKED);
         TaskManagerSettings.AlwaysOnTop = FALSE;
index aac8d2c..6dfb99d 100644 (file)
@@ -250,7 +250,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
             GetCursorPos(&pt);
 
-            OnTop = ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
+            OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
 
             hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_TRAY_POPUP));
             hPopupMenu = GetSubMenu(hMenu, 0);
@@ -758,7 +758,7 @@ void TaskManager_OnRestoreMainWindow(void)
 
     hMenu = GetMenu(hMainWnd);
     hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
-    OnTop = ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
+    OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
 
     OpenIcon(hMainWnd);
     SetForegroundWindow(hMainWnd);
index d0c8d91..dde9dc5 100644 (file)
@@ -194,8 +194,8 @@ StartDlgProc(HWND hwndDlg,
             /* Center the wizard window */
             CenterWindow (hwndControl);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             /* Hide and disable the 'Cancel' button at the moment,
              * we use this button to cancel the setup process
@@ -259,8 +259,8 @@ LangSelDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
             
             hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
             ShowWindow (hwndControl, SW_SHOW);
@@ -349,9 +349,9 @@ LangSelDlgProc(HWND hwndDlg,
                     break;
 
                 case PSN_QUERYCANCEL:
-                    SetWindowLong(hwndDlg,
-                                  DWL_MSGRESULT,
-                                  MessageBox(GetParent(hwndDlg),
+                    SetWindowLongPtr(hwndDlg,
+                                     DWL_MSGRESULT,
+                                     MessageBox(GetParent(hwndDlg),
                                              abort_msg,
                                              abort_title,
                                              MB_YESNO | MB_ICONQUESTION) != IDYES);
@@ -408,8 +408,8 @@ TypeDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             CheckDlgButton(hwndDlg, IDC_INSTALL, BST_CHECKED);
             
@@ -433,9 +433,9 @@ TypeDlgProc(HWND hwndDlg,
                 break;
 
                 case PSN_QUERYCANCEL:
-                    SetWindowLong(hwndDlg,
-                                  DWL_MSGRESULT,
-                                  MessageBox(GetParent(hwndDlg),
+                    SetWindowLongPtr(hwndDlg,
+                                     DWL_MSGRESULT,
+                                     MessageBox(GetParent(hwndDlg),
                                              abort_msg,
                                              abort_title,
                                              MB_YESNO | MB_ICONQUESTION) != IDYES);
@@ -480,8 +480,8 @@ DeviceDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             /* Set title font */
             /*SendDlgItemMessage(hwndDlg,
@@ -530,9 +530,9 @@ DeviceDlgProc(HWND hwndDlg,
                     break;
 
                 case PSN_QUERYCANCEL:
-                    SetWindowLong(hwndDlg,
-                                  DWL_MSGRESULT,
-                                  MessageBox(GetParent(hwndDlg),
+                    SetWindowLongPtr(hwndDlg,
+                                     DWL_MSGRESULT,
+                                     MessageBox(GetParent(hwndDlg),
                                              abort_msg,
                                              abort_title,
                                              MB_YESNO | MB_ICONQUESTION) != IDYES);
@@ -680,8 +680,8 @@ DriveDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             /* Set title font */
             /*SendDlgItemMessage(hwndDlg,
@@ -762,9 +762,9 @@ DriveDlgProc(HWND hwndDlg,
                     break;
 
                 case PSN_QUERYCANCEL:
-                    SetWindowLong(hwndDlg,
-                                  DWL_MSGRESULT,
-                                  MessageBox(GetParent(hwndDlg),
+                    SetWindowLongPtr(hwndDlg,
+                                     DWL_MSGRESULT,
+                                     MessageBox(GetParent(hwndDlg),
                                              abort_msg,
                                              abort_title,
                                              MB_YESNO | MB_ICONQUESTION) != IDYES);
@@ -799,8 +799,8 @@ SummaryDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
             ShowWindow(hwndControl, SW_HIDE);
@@ -853,8 +853,8 @@ ProcessDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
             ShowWindow(hwndControl, SW_HIDE);
@@ -910,8 +910,8 @@ RestartDlgProc(HWND hwndDlg,
 
             hwndControl = GetParent(hwndDlg);
 
-            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
+            SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
         
             /* Set title font */
             /*SendDlgItemMessage(hwndDlg,
index 1035389..dbfc9de 100644 (file)
@@ -389,7 +389,7 @@ PageWelcomeProc(
                 {
                     if(DriverFilesFound)
                     {
-                        SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CONFIG);
+                        SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CONFIG);
                         return TRUE;
                     }
                     break;
@@ -421,7 +421,7 @@ PageInsertDiscProc(
                 PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
                 break;
             case PSN_WIZNEXT:
-                SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSTALLING_VMWARE_TOOLS);
+                SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_INSTALLING_VMWARE_TOOLS);
                 break;
             }
             break;
@@ -567,13 +567,13 @@ PageInstallingProc(
                 {
                     PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
                     InstTerminateInstaller(FALSE);
-                    SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+                    SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
                     return -1;
                 }
                 else
                 {
                     SendDlgItemMessage(hwndDlg, IDC_INSTALLINGPROGRESS, PBM_SETMARQUEE, FALSE, 0);
-                    SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
+                    SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
                 }
                 break;
             }
@@ -713,12 +713,12 @@ PageConfigProc(
                 {
                     if(StartVMwConfigWizard)
                     {
-                        SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
+                        SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
                         return TRUE;
                     }
                     if(DriverFilesFound)
                     {
-                        SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE);
+                        SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE);
                         return TRUE;
                     }
                     break;
@@ -797,7 +797,7 @@ PageChooseActionProc(
                 break;
             case PSN_WIZBACK:
                 {
-                    SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
+                    SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
                     return TRUE;
                 }
             case PSN_WIZNEXT:
@@ -815,7 +815,7 @@ PageChooseActionProc(
 
                     UninstallDriver = (i == IDC_UNINSTALL);
 
-                    SetWindowLong(hwndDlg, DWL_MSGRESULT, SelPage[i - IDC_CONFIGSETTINGS]);
+                    SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, SelPage[i - IDC_CONFIGSETTINGS]);
                     return TRUE;
                 }
             }
@@ -849,7 +849,7 @@ PageSelectDriverProc(
                 break;
             case PSN_WIZBACK:
                 {
-                    SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
+                    SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
                     return TRUE;
                 }
             case PSN_WIZNEXT:
@@ -876,7 +876,7 @@ PageSelectDriverProc(
                         WCHAR Msg[1024];
                         LoadString(hAppInstance, (ActivateVBE ? IDS_FAILEDTOSELVBEDRIVER : IDS_FAILEDTOSELVGADRIVER), Msg, sizeof(Msg) / sizeof(WCHAR));
                         MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
-                        SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
+                        SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
                         return TRUE;
                     }
                     break;
@@ -925,7 +925,7 @@ PageDoUninstallProc(
                             WCHAR Msg[1024];
                             LoadString(hAppInstance, (ActivateVBE ? IDS_FAILEDTOSELVBEDRIVER : IDS_FAILEDTOSELVGADRIVER), Msg, sizeof(Msg) / sizeof(WCHAR));
                             MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
-                            SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
+                            SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTDRIVER);
                             return TRUE;
                         }
                         ShowUninstNotice(GetParent(hwndDlg));
index 2c93c43..9c988d2 100755 (executable)
@@ -222,7 +222,7 @@ ButtonSubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
   if (uMsg == WM_MOUSEMOVE)
     {
-      i = GetWindowLong(hWnd, GWL_ID);
+      i = GetWindowLongPtr(hWnd, GWL_ID);
       if (nTopic != i)
        {
          nTopic = i;
index 1ee6224..0a90858 100644 (file)
@@ -38,17 +38,17 @@ SetWindowStyle(IN HWND hWnd,
 
     ASSERT((~dwStyleMask & dwStyle) == 0);
 
-    PrevStyle = GetWindowLong(hWnd,
-                              GWL_STYLE);
+    PrevStyle = GetWindowLongPtr(hWnd,
+                                 GWL_STYLE);
     if (PrevStyle != 0 &&
         (PrevStyle & dwStyleMask) != dwStyle)
     {
         Style = PrevStyle & ~dwStyleMask;
         Style |= dwStyle;
 
-        PrevStyle = SetWindowLong(hWnd,
-                                  GWL_STYLE,
-                                  Style);
+        PrevStyle = SetWindowLongPtr(hWnd,
+                                     GWL_STYLE,
+                                     Style);
     }
 
     return PrevStyle;
@@ -63,17 +63,17 @@ SetWindowExStyle(IN HWND hWnd,
 
     ASSERT((~dwStyleMask & dwStyle) == 0);
 
-    PrevStyle = GetWindowLong(hWnd,
-                              GWL_EXSTYLE);
+    PrevStyle = GetWindowLongPtr(hWnd,
+                                 GWL_EXSTYLE);
     if (PrevStyle != 0 &&
         (PrevStyle & dwStyleMask) != dwStyle)
     {
         Style = PrevStyle & ~dwStyleMask;
         Style |= dwStyle;
 
-        PrevStyle = SetWindowLong(hWnd,
-                                  GWL_EXSTYLE,
-                                  Style);
+        PrevStyle = SetWindowLongPtr(hWnd,
+                                     GWL_EXSTYLE,
+                                     Style);
     }
 
     return PrevStyle;
index f4f0370..e1e578d 100644 (file)
@@ -1326,8 +1326,8 @@ TaskSwitchWnd_EnumWindowsProc(IN HWND hWnd,
         /* Don't list popup windows and also no tool windows */
         if (GetWindow(hWnd,
                       GW_OWNER) == NULL &&
-            !(GetWindowLong(hWnd,
-                            GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+            !(GetWindowLongPtr(hWnd,
+                               GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
         {
             TaskSwitchWnd_AddTask(This,
                                   hWnd);
index d372166..3906abc 100644 (file)
@@ -269,8 +269,8 @@ TrayClockWnd_UpdateWnd(IN OUT PTRAY_CLOCK_WND_DATA This)
             NMHDR nmh;
 
             nmh.hwndFrom = This->hWnd;
-            nmh.idFrom = GetWindowLong(This->hWnd,
-                                       GWL_ID);
+            nmh.idFrom = GetWindowLongPtr(This->hWnd,
+                                          GWL_ID);
             nmh.code = NTNWM_REALIGN;
 
             SendMessage(This->hWndNotify,
@@ -716,11 +716,11 @@ TrayNotifyWnd_UpdateStyle(IN OUT PTRAY_NOTIFY_WND_DATA This)
     RECT rcClient = { 0, 0, 0, 0 };
 
     if (AdjustWindowRectEx(&rcClient,
-                           GetWindowLong(This->hWnd,
-                                         GWL_STYLE),
+                           GetWindowLongPtr(This->hWnd,
+                                            GWL_STYLE),
                            FALSE,
-                           GetWindowLong(This->hWnd,
-                                         GWL_EXSTYLE)))
+                           GetWindowLongPtr(This->hWnd,
+                                            GWL_EXSTYLE)))
     {
         This->szNonClient.cx = rcClient.right - rcClient.left;
         This->szNonClient.cy = rcClient.bottom - rcClient.top;
index a37733f..4e8438f 100644 (file)
@@ -362,11 +362,11 @@ ITrayWindowImpl_GetMinimumWindowSize(IN OUT ITrayWindowImpl *This,
     RECT rcMin = {0};
 
     AdjustWindowRectEx(&rcMin,
-                       GetWindowLong(This->hWnd,
-                                     GWL_STYLE),
+                       GetWindowLongPtr(This->hWnd,
+                                        GWL_STYLE),
                        FALSE,
-                       GetWindowLong(This->hWnd,
-                                     GWL_EXSTYLE));
+                       GetWindowLongPtr(This->hWnd,
+                                        GWL_EXSTYLE));
 
     *pRect = rcMin;
 }
index c4d7db6..f10d14d 100644 (file)
@@ -104,7 +104,7 @@ int DesktopSettingsDlg::Notify(int id, NMHDR* pnmh)
 {
        switch(pnmh->code) {
          case PSN_QUERYINITIALFOCUS:
-               SetWindowLong(_hwnd, DWL_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur));
+               SetWindowLongPtr(_hwnd, DWL_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur));
                break;
 
          case PSN_APPLY:
index 37203f1..9f42ef6 100644 (file)
@@ -143,9 +143,9 @@ extern void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR*
 #endif
 
 
-#define        SetDlgCtrlID(hwnd, id) SetWindowLong(hwnd, GWL_ID, id)
-#define        SetWindowStyle(hwnd, val) (DWORD)SetWindowLong(hwnd, GWL_STYLE, val)
-#define        SetWindowExStyle(h, val) (DWORD)SetWindowLong(hwnd, GWL_EXSTYLE, val)
+#define        SetDlgCtrlID(hwnd, id) SetWindowLongPtr(hwnd, GWL_ID, id)
+#define        SetWindowStyle(hwnd, val) (DWORD)SetWindowLongPtr(hwnd, GWL_STYLE, val)
+#define        SetWindowExStyle(h, val) (DWORD)SetWindowLongPtr(hwnd, GWL_EXSTYLE, val)
 #define        Window_SetIcon(hwnd, type, hicon) (HICON)SendMessage(hwnd, WM_SETICON, type, (LPARAM)(hicon))
 
 
index c05acb2..9eb19fb 100644 (file)
@@ -732,7 +732,7 @@ INT_PTR CALLBACK Window::DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
                        return TRUE;    // message has been processed
 
                  case WM_NOTIFYFORMAT:
-                       SetWindowLong(hwnd, DWLP_MSGRESULT, NFR_CURRENT);       // set return value NFR_CURRENT
+                       SetWindowLongPtr(hwnd, DWLP_MSGRESULT, NFR_CURRENT);    // set return value NFR_CURRENT
                        return TRUE;    // message has been processed
 
                  case WM_NCDESTROY:
@@ -1418,7 +1418,7 @@ INT_PTR CALLBACK PropSheetPageDlg::DialogProc(HWND hwnd, UINT nmsg, WPARAM wpara
                        return TRUE;    // message has been processed
 
                  case WM_NOTIFYFORMAT:
-                       SetWindowLong(hwnd, DWLP_MSGRESULT, NFR_CURRENT);       // set return value NFR_CURRENT
+                       SetWindowLongPtr(hwnd, DWLP_MSGRESULT, NFR_CURRENT);    // set return value NFR_CURRENT
                        return TRUE;    // message has been processed
 
                  case WM_NCDESTROY: