CComboBox::SetItemHeight() increases both the Item and control height

805 Views Asked by At

I am using a class that is the descendant of CComboBox. The problem occurs when I call the CComboBox::SetItemHeight method to set the height of my combobox items using the following code:

m_searchComboBox.SetItemHeight(0,17);

It sets the height of Items but the height of the control (dropdown list) is also increased and the new height is larger than the height I set through Dialog Box. I also tried the following code:

m_searchComboBox.SetItemHeight(-1,17);

But that sets the height of the edit-control not the height of items. What should I do to set the height of Combobox items without disturbing the height of dropdown list?

0

There are 0 best solutions below