user32: Select/deselect edit field text when a combo box gets/loses focus
Dmitry Timoshkov
dmitry at baikal.ru
Tue Dec 15 04:52:08 CST 2015
Hugh McMaster <hugh.mcmaster at outlook.com> 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.
--
Dmitry.
More information about the wine-devel
mailing list