Fix bug #166 ('FileDialog returns empty string or error in run from the start menu').
authorFilip Navara <filip.navara@gmail.com>
Wed, 21 Jan 2004 18:38:53 +0000 (18:38 +0000)
committerFilip Navara <filip.navara@gmail.com>
Wed, 21 Jan 2004 18:38:53 +0000 (18:38 +0000)
svn path=/trunk/; revision=7809

reactos/lib/shell32/dialogs.c

index d2ddecb..11a70f9 100644 (file)
@@ -240,12 +240,13 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
                         return TRUE ;
                         }
 
-                    ofnProc (&ofn) ;
-
-                    SetFocus (GetDlgItem (hwnd, IDOK)) ;
-                    SetWindowTextA (GetDlgItem (hwnd, 12298), szFName) ;
-                    SendMessageA (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
-                    SetFocus (GetDlgItem (hwnd, IDOK)) ;
+                    if (ofnProc (&ofn))
+                        {
+                        SetFocus (GetDlgItem (hwnd, IDOK)) ;
+                        SetWindowTextA (GetDlgItem (hwnd, 12298), szFName) ;
+                        SendMessageA (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
+                        SetFocus (GetDlgItem (hwnd, IDOK)) ;
+                        }
 
                     FreeLibrary (hComdlg) ;