comctl32: Forward the focus to the edit control if it exists.

This commit is contained in:
Huw Davies 2012-09-25 12:40:17 +01:00 committed by Alexandre Julliard
parent 06439b303a
commit 3cfc2ab772
2 changed files with 7 additions and 1 deletions

View File

@ -2308,7 +2308,8 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return COMBOEX_WindowPosChanging (infoPtr, (WINDOWPOS *)lParam);
case WM_SETFOCUS:
SetFocus(infoPtr->hwndCombo);
if (infoPtr->hwndEdit) SetFocus( infoPtr->hwndEdit );
else SetFocus( infoPtr->hwndCombo );
return 0;
case WM_SYSCOLORCHANGE:

View File

@ -345,6 +345,11 @@ static void test_WM_LBUTTONDOWN(void)
"Current Selection: expected %d, got %d\n", 4, idx);
ok(received_end_edit, "Expected to receive a CBEN_ENDEDIT message\n");
SetFocus( hComboExParentWnd );
ok( GetFocus() == hComboExParentWnd, "got %p\n", GetFocus() );
SetFocus( hComboEx );
ok( GetFocus() == hEdit, "got %p\n", GetFocus() );
DestroyWindow(hComboEx);
}