I wonder if someone knows a way to change the height of a combobox. The height parameter is only used for the drop down menu so that I don't see an obvious way of reducing the size of the editbox/button part.
I don't think you can do that - it's autosized by the font that's selected into it, iirc.
Doesn't CBS_NOINTEGRALHEIGHT work on the edit part?
You might want to look into OwnerDrawn ComboBoxes.
Homer s right, create your combo with CBS_OWNERDRAWFIXED and draw the strings, selection (and icons?) inside WM_DRAWITEM. You receive once a WM_MEASUREITEM message where you can change the height to any number of pixels.
Note the CBS_OWNERDRAWFIXED style automatically increases the combo height, so correcting this is neccesary
case WM_MEASUREITEM:
MEASUREITEMSTRUCT *lpMeasureItem = (MEASUREITEMSTRUCT*)lParam;
if (wParam == IDC_COMBO1)
{
lpMeasureItem->itemHeight = 8; return true;
Note the CBS_OWNERDRAWFIXED style automatically increases the combo height, so correcting this is neccesary
Thanks guys... Looking for ownerdrawn comboboxes I found Donkey's example and I'll have a look at that today. I also consider a custom control. (After all, a combobox is just an edit window, a listbox and a button.)