2

CComboBox contains one text edit window and a dropdown window. I intend to change the text edit control's height. Any suggestion is appreciated.

Hardy Feng
  • 459
  • 4
  • 13

2 Answers2

2

Set font of Combobox control.

// *.h
CComboBox m_combo1;

// *.cpp    
CFont comboFont;
comboFont.Create(18, 0, 0, 0, FW_BOLD, FALSE, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
        CLIP_DEFAULT_PRECIS, CLEARTYPE_NATURAL_QUALITY, DEFAULT_PITCH | FF_SWISS, _T("Arial"));

m_combo1.SetFont(&comboFont);
...
Christian Fritz
  • 20,641
  • 3
  • 42
  • 71
2

From MSDN:

Call the SetItemHeight member function to set the height of list items in a combo box or the height of the edit-control (or static-text) portion of a combo box.

m_comboBox.SetItemHeight( -1 /*edit control*/, 15 /*height in pixels*/ );
J. Wells
  • 21
  • 2