解决rc中无法设置CComboBox下拉列表框高度的问题
清泛原创
怎么修改CComboBox实例的高度,注意,不是下拉框的!(在rc资源中无法调整高度)
m_combo.SetItemHeight(-1, 50);
If nIndex is –1, the height of the edit-control or static-text portion of the combo box is to be set.
m_combo.SetItemHeight(-1, 50);
If nIndex is –1, the height of the edit-control or static-text portion of the combo box is to be set.
int CComboBox::SetItemHeight(
int nIndex,
UINT cyItemHeight
);
nIndex
Specifies whether the height of list items or the height of the edit-control (or static-text) portion of the combo box is set.
If the combo box has the CBS_OWNERDRAWVARIABLE style, nIndex specifies the zero-based index of the list item whose height is to be set; otherwise, nIndex must be 0 and the height of all list items will be set.
If nIndex is –1, the height of the edit-control or static-text portion of the combo box is to be set.
cyItemHeight
Specifies the height, in pixels, of the combo-box component identified by nIndex.
上一篇:MFC MDI多文档程序恢复初始布局的方法
下一篇:MFC的DDX和DDV技巧