From 88e9501004c6594a2cf59a0eb12cdb96e8803071 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 26 Jun 1999 11:49:44 +0000 Subject: [PATCH] Better ComboBoxEx placement. --- dlls/comctl32/rebar.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 1bcfac14ffd..e119d9d77ee 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -429,8 +429,24 @@ REBAR_MoveChildWindows (HWND hwnd) } #if 0 else if (!lstrcmpA (szClassName, WC_COMBOBOXEXA)) { + INT nEditHeight, yPos; + RECT rc; + HWND hwndEdit; + /* special placement code for extended combo box */ + /* get size of edit line */ + hwndEdit = SendMessageA (lpBand->hwndChild, CBEM_GETEDITCONTROL, 0, 0); + GetWindowRect (hwndEdit, &rc); + nEditHeight = rc.bottom - rc.top; + yPos = (lpBand->rcChild.bottom + lpBand->rcChild.top - nEditHeight)/2; + + /* center combo box inside child area */ + SetWindowPos (lpBand->hwndChild, HWND_TOP, + lpBand->rcChild.left, /*lpBand->rcChild.top*/ yPos, + lpBand->rcChild.right - lpBand->rcChild.left, + nEditHeight, + SWP_SHOWWINDOW); } #endif -- 2.11.4.GIT