From: Sebastian Lackner sebastian@fds-team.de
This partly reverts commit f7f7b89e2e9117811c91269643868c6d063db5e9. (Tests are left inplace).
Any application that currently uses "Microsoft.Windows.Common-Controls v6" via a Manifest has the possibility of breaking comboboxes. Using this version of the control ensures that dropdown for comboboxes, will show multiple items, regardless of its height in the resource.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/user32/combo.c | 8 ++++++++ dlls/user32/tests/combo.c | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 2f270e5..7d15ff7 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1044,6 +1044,14 @@ static void CBDropDown( LPHEADCOMBO lphc )
if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE()) nDroppedHeight = nHeight + COMBO_YBORDERSIZE(); + + if (nDroppedHeight < nHeight) + { + if (nItems < 5) + nDroppedHeight = (nItems+1)*nIHeight; + else if (nDroppedHeight < 6*nIHeight) + nDroppedHeight = 6*nIHeight; + } }
r.left = rect.left; diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 0519ace..72e8777 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -718,25 +718,25 @@ static void test_listbox_size(DWORD style) int height_combo; BOOL todo; } info_height[] = { - {2, 24}, + {2, 24, TRUE}, {2, 41, TRUE}, - {2, 42}, - {2, 50}, + {2, 42, TRUE}, + {2, 50, TRUE}, {2, 60}, {2, 80}, {2, 89}, {2, 90}, {2, 100},
- {10, 24}, + {10, 24, TRUE}, {10, 41, TRUE}, - {10, 42}, - {10, 50}, - {10, 60}, - {10, 80}, + {10, 42, TRUE}, + {10, 50, TRUE}, + {10, 60, TRUE}, + {10, 80, TRUE}, {10, 89, TRUE}, - {10, 90}, - {10, 100}, + {10, 90, TRUE}, + {10, 100, TRUE}, };
pGetComboBoxInfo = (void *)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo");