CComboBox::MeasureItem

This member function is 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.

Syntax

virtual void MeasureItem( LPMEASUREITEMSTRUCT lpMeasureItemStruct );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CComboBox Overview, CComboBox Member Functions, Control Classes, CComboBox::CompareItem, CComboBox::DrawItem, CComboBox::DeleteItem, CWnd::SubclassDlgItem