From 2be4bec4f17288c74fe467f5017cd3e36091ca96 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Fri, 23 Sep 2005 15:42:40 +0000 Subject: [PATCH] - Return focus to run dialog after showing the file not found messagebox. Patch by brbak svn path=/trunk/; revision=18015 --- reactos/lib/shell32/dialogs.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/reactos/lib/shell32/dialogs.c b/reactos/lib/shell32/dialogs.c index 357d633feca..d9363b36e42 100644 --- a/reactos/lib/shell32/dialogs.c +++ b/reactos/lib/shell32/dialogs.c @@ -162,6 +162,7 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar HeapFree(GetProcessHeap(), 0, psz); SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + SetFocus(htxt); return TRUE ; } FillList (htxt, psz) ; @@ -217,15 +218,19 @@ 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)) ; + } + else + { + SetFocus(GetDlgItem(hwnd, 12288)); + } FreeLibrary (hComdlg) ; - return TRUE ; } }