16 Feb
2016
16 Feb
'16
12:04 a.m.
Piotr Caban <piotr(a)codeweavers.com> wrote:
--- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -707,7 +707,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, -1 ); SetFocus( focus ); + } }
Selecting the text on SetFocus() is the job of DefDlgProc(), it's worth to investigate why it doesn't work. -- Dmitry.