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

CBDropDown.
This commit is contained in:
Gerard Patel 2000-06-25 12:47:59 +00:00 committed by Alexandre Julliard
parent bb9e66e265
commit d292234835
1 changed files with 5 additions and 1 deletions

View File

@ -1106,7 +1106,7 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
*/
static void CBDropDown( LPHEADCOMBO lphc )
{
RECT rect;
RECT rect,r;
int nItems = 0;
int nDroppedHeight;
@ -1148,6 +1148,10 @@ static void CBDropDown( LPHEADCOMBO lphc )
/* And Remove any extra space (Best Fit) */
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);
if (nItems > 0)