diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c
index fb4c55e912948dce812db73d8c8b25eeccf34099..63fb3a7b2bdbb69c0528129adbdf46ee04c76387 100644
--- a/dlls/commdlg/filedlg95.c
+++ b/dlls/commdlg/filedlg95.c
@@ -653,6 +653,10 @@ HRESULT WINAPI FileOpenDlgProcUserTemplate(HWND hwnd, UINT uMsg, WPARAM wParam,
     {
       case WM_INITDIALOG:
       {         
+        /* Hide caption since some program may leave it */
+        DWORD Style = GetWindowLongA(hwnd, GWL_STYLE);
+        if (Style & WS_CAPTION) SetWindowLongA(hwnd, GWL_STYLE, Style & (~WS_CAPTION));
+
         fodInfos = (FileOpenDlgInfos *)lParam;
         lParam = (LPARAM) fodInfos->ofnInfos;
         ArrangeCtrlPositions(hwnd,GetParent(hwnd));
@@ -846,10 +850,6 @@ HRESULT WINAPI FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
       {
          FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam;
 
-         /* Hide caption since some program may leave it */
-         DWORD Style = GetWindowLongA(hwnd, GWL_STYLE);
-         if (Style & WS_CAPTION) SetWindowLongA(hwnd, GWL_STYLE, Style & (~WS_CAPTION));
-
 	 /* Adds the FileOpenDlgInfos in the property list of the dialog 
             so it will be easily accessible through a GetPropA(...) */
       	 SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);