From b0c749c4ea54938d7033babae2619913e97f0198 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 26 Mar 2016 21:20:55 +0000 Subject: [PATCH] [User32] - Patch by Piotr Caban : Select text control content while setting dialog focus. - CORE-10912 Wine Staging 1.9.4 - Added comments. svn path=/trunk/; revision=71058 --- reactos/win32ss/user/user32/windows/dialog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/win32ss/user/user32/windows/dialog.c b/reactos/win32ss/user/user32/windows/dialog.c index 8b9b7436b3c..d51ca3d5411 100644 --- a/reactos/win32ss/user/user32/windows/dialog.c +++ b/reactos/win32ss/user/user32/windows/dialog.c @@ -1049,7 +1049,11 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, focus = GetNextDlgTabItem( hwnd, 0, FALSE ); if (!focus) focus = GetNextDlgGroupItem( hwnd, 0, FALSE ); if (focus) + { + if (SendMessageW( focus, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL) + SendMessageW( focus, EM_SETSEL, 0, MAXLONG ); SetFocus( focus ); + } } //// ReactOS see 43396, Fixes setting focus on Open and Close dialogs to the FileName edit control in OpenOffice. //// This now breaks test_SaveRestoreFocus. @@ -2021,7 +2025,7 @@ DlgDirSelectExW( /* - * @implemented Modified for ReactOS. + * @implemented Modified for ReactOS. Do not Port Sync!!! */ BOOL WINAPI