user32: Select/deselect edit field text when a combo box gets/loses focus

Hugh McMaster hugh.mcmaster at outlook.com
Thu Dec 17 05:25:10 CST 2015


On Tuesday, 15 Dec 2015 18:52:08 +0800, Dmitry Timoshkov wrote:
> Hugh McMaster wrote:
>
>> --- a/dlls/user32/combo.c
>> +++ b/dlls/user32/combo.c
>> @@ -1215,7 +1215,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
>> case (EN_SETFOCUS>> 8):
>>
>> TRACE("[%p]: edit [%p] got focus\n", lphc->self, lphc->hWndEdit );
>> -
>> + SendMessageW( lphc->hWndEdit, EM_SETSEL, 0, -1 );
>> COMBO_SetFocus( lphc );
>> break;
>>
>> @@ -1228,7 +1228,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
>> * notification (only when it happens to be a part of
>> * the combo). ?? - AK.
>> */
>> -
>> + SendMessageW( lphc->hWndEdit, EM_SETSEL, -1, 0 );
>> COMBO_KillFocus( lphc );
>> break;
>
> These changes require tests to confirm their correctness, and the tests need
> to cover the cases when a control is part of a dialog and when it's not.

Do we have any code for testing when a control is not part of a dialog? I have no idea how to test that.
 		 	   		  


More information about the wine-devel mailing list