[SHELL32] Fix usage of DeferWindowPos (fix of #544) (#552)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Fri, 18 May 2018 20:27:22 +0000 (05:27 +0900)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Fri, 18 May 2018 20:27:22 +0000 (22:27 +0200)
dll/win32/shell32/dialogs/folder_options.cpp

index 12af778..b53dd8c 100644 (file)
@@ -1622,17 +1622,17 @@ NewExtDlg_OnAdvanced(HWND hwndDlg, NEWEXT_DIALOG *pNewExt)
     HDWP hDWP = BeginDeferWindowPos(3);
 
     if (hDWP)
-        DeferWindowPos(hDWP, GetDlgItem(hwndDlg, IDOK), NULL,
-                       rc1.left, rc1.top, rc1.right - rc1.left, rc1.bottom - rc1.top,
-                       SWP_NOACTIVATE | SWP_NOZORDER);
+        hDWP = DeferWindowPos(hDWP, GetDlgItem(hwndDlg, IDOK), NULL,
+                              rc1.left, rc1.top, rc1.right - rc1.left, rc1.bottom - rc1.top,
+                              SWP_NOACTIVATE | SWP_NOZORDER);
     if (hDWP)
-        DeferWindowPos(hDWP, GetDlgItem(hwndDlg, IDCANCEL), NULL,
-                       rc2.left, rc2.top, rc2.right - rc2.left, rc2.bottom - rc2.top,
-                       SWP_NOACTIVATE | SWP_NOZORDER);
+        hDWP = DeferWindowPos(hDWP, GetDlgItem(hwndDlg, IDCANCEL), NULL,
+                              rc2.left, rc2.top, rc2.right - rc2.left, rc2.bottom - rc2.top,
+                              SWP_NOACTIVATE | SWP_NOZORDER);
     if (hDWP)
-        DeferWindowPos(hDWP, hwndDlg, NULL,
-                       rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
-                       SWP_NOACTIVATE | SWP_NOZORDER);
+        hDWP = DeferWindowPos(hDWP, hwndDlg, NULL,
+                              rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
+                              SWP_NOACTIVATE | SWP_NOZORDER);
 
     if (hDWP)
         EndDeferWindowPos(hDWP);