diff --git a/windows/defdlg.c b/windows/defdlg.c index e00dec68a81..39585702724 100644 --- a/windows/defdlg.c +++ b/windows/defdlg.c @@ -207,22 +207,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, HWND hwndFocus = GetFocus(); if (hwndFocus) { - WND *wnd = WIN_FindWndPtr( hwndFocus ); - - if( wnd ) - { - /* always make combo box hide its listbox control */ - - if( WIDGETS_IsControl( wnd, BIC32_COMBO ) ) - SendMessageA( hwndFocus, CB_SHOWDROPDOWN, - FALSE, 0 ); - else if( WIDGETS_IsControl( wnd, BIC32_EDIT ) && - WIDGETS_IsControl( wnd->parent, - BIC32_COMBO )) - SendMessageA( wnd->parent->hwndSelf, - CB_SHOWDROPDOWN, FALSE, 0 ); - } - WIN_ReleaseWndPtr(wnd); + /* always make combo box hide its listbox control */ + if (!SendMessageA( hwndFocus, CB_SHOWDROPDOWN, FALSE, 0 )) + SendMessageA( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 ); } } return DefWindowProcA( hwnd, msg, wParam, lParam ); diff --git a/windows/winproc.c b/windows/winproc.c index 57be90970cd..e3743152ef6 100644 --- a/windows/winproc.c +++ b/windows/winproc.c @@ -1936,20 +1936,16 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32, *plparam = MAKELPARAM( HIWORD(wParam32), (HMENU16)*plparam ); return 0; case WM_MDIACTIVATE: - { - WND *tempWnd = WIN_FindWndPtr(hwnd); - if( WIDGETS_IsControl(tempWnd, BIC32_MDICLIENT) ) - { - *pwparam16 = (HWND)wParam32; - *plparam = 0; - } - else - { - *pwparam16 = ((HWND)*plparam == hwnd); - *plparam = MAKELPARAM( (HWND16)LOWORD(*plparam), - (HWND16)LOWORD(wParam32) ); - } - WIN_ReleaseWndPtr(tempWnd); + if (GetWindowLongA( hwnd, GWL_EXSTYLE ) & WS_EX_MDICHILD) + { + *pwparam16 = ((HWND)*plparam == hwnd); + *plparam = MAKELPARAM( (HWND16)LOWORD(*plparam), + (HWND16)LOWORD(wParam32) ); + } + else + { + *pwparam16 = (HWND)wParam32; + *plparam = 0; } return 0; case WM_NCCALCSIZE: