Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Code to share.Set combo height.

void CMyCombo::ZoomShape(int hZS, int vZS)
{
CRect rect = ZoomRect(m_rectSizeAndPosition, ((CUFillerCtrl*)(GetParent()->GetParent()))->m_ihorzScale,
((CUFillerCtrl*)(GetParent()->GetParent()))->m_ivertScale);
rect.InflateRect(-2,-2);
rect.bottom = rect.bottom+ rect.Height()*3;

CComboBox* pCombo = (CComboBox*)this;
CRect rectDropDown;
pCombo->GetDroppedControlRect(&rectDropDown);
pCombo->SetWindowPos(0, rect.left, rect.top, rect.Width(), rectDropDown.Height(), flags);
pCombo->SetItemHeight(-1,m_rectSizeAndPosition.Height() * ((CUFillerCtrl*)(GetParent()->GetParent()))->m_ivertScale/100);

}
Sign In or Register to comment.