user32: Select text control content while setting initial dialog focus
Hugh McMaster
hugh.mcmaster at outlook.com
Mon Feb 15 21:41:03 CST 2016
On Tue, 16 Feb 2016 08:04:35 +0800, Dmitry Timoshkov wrote:
>>Piotr Caban 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.
I'm guessing this doesn't work for the same (or similar) reasons as with the combo box issue.
--
Hugh McMaster
More information about the wine-devel
mailing list