Restore Focus
Johannes Anderwald
j_anderw at sbox.tugraz.at
Sat Sep 24 16:01:06 CDT 2005
Hi,
I have a small patch regarding shell32:
- Return focus to run dialog after showing the file not found messagebox
- Replace text only if search dialog has selected a file
Changed files: dlls/shell32/dialogs.c
Name: Johannes Anderwald mpd000 at yahoo.de
regards,
--
Johannes Anderwald
-------------- next part --------------
--- dialogold.c 2005-09-24 22:43:49.754223880 +0200
+++ dialog.c 2005-09-24 22:44:20.629530120 +0200
@@ -162,6 +162,7 @@
HeapFree(GetProcessHeap(), 0, psz);
SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
+ SetFocus(htxt);
return TRUE ;
}
FillList (htxt, psz) ;
@@ -217,13 +218,17 @@
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 ;
More information about the wine-patches
mailing list