CComboBox::MeasureItem

virtual void MeasureItem( LPMEASUREITEMSTRUCT lpMeasureItemStruct );

Parameters

lpMeasureItemStruct

A long pointer to a MEASUREITEMSTRUCT structure.

Remarks

Called by the framework when a combo box with an owner-draw style is created.

By default, this member function does nothing. Override this member function and fill in the MEASUREITEMSTRUCT structure to inform Windows of the dimensions of the list box in the combo box. If the combo box is created with the CBS_OWNERDRAWVARIABLE style, the framework calls this member function for each item in the list box. Otherwise, this member is called only once.

Using the CBS_OWNERDRAWFIXED style in an owner-draw combo box created with the SubclassDlgItem member function of CWnd involves further programming considerations. See the discussion in Technical Note 14.

See CWnd::OnMeasureItem for a description of the MEASUREITEMSTRUCT structure.

CComboBox OverviewClass MembersHierarchy Chart

See Also   CComboBox::CompareItem, CComboBox::DrawItem, WM_MEASUREITEM, CComboBox::DeleteItem