Commit d2922348 authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Set the minimum dropped height to the combo list height if any in

CBDropDown.
parent bb9e66e2
...@@ -1106,7 +1106,7 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index ) ...@@ -1106,7 +1106,7 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
*/ */
static void CBDropDown( LPHEADCOMBO lphc ) static void CBDropDown( LPHEADCOMBO lphc )
{ {
RECT rect; RECT rect,r;
int nItems = 0; int nItems = 0;
int nDroppedHeight; int nDroppedHeight;
...@@ -1148,6 +1148,10 @@ static void CBDropDown( LPHEADCOMBO lphc ) ...@@ -1148,6 +1148,10 @@ static void CBDropDown( LPHEADCOMBO lphc )
/* And Remove any extra space (Best Fit) */ /* And Remove any extra space (Best Fit) */
nDroppedHeight = lphc->droppedRect.bottom - lphc->droppedRect.top; nDroppedHeight = lphc->droppedRect.bottom - lphc->droppedRect.top;
/* if listbox length has been set directly by its handle */
GetWindowRect(lphc->hWndLBox, &r);
if (nDroppedHeight < r.bottom - r.top)
nDroppedHeight = r.bottom - r.top;
nItems = (int)SendMessageA (lphc->hWndLBox, LB_GETCOUNT, 0, 0); nItems = (int)SendMessageA (lphc->hWndLBox, LB_GETCOUNT, 0, 0);
if (nItems > 0) if (nItems > 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment