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

Hugh McMaster hugh.mcmaster at outlook.com
Tue Dec 15 04:32:16 CST 2015


Based on a patch by Nikolay Sivov.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 dlls/user32/combo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index c744ee5..704ab38 100644
--- 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;
 
-- 
1.9.1




More information about the wine-patches mailing list