MEASUREITEMSTRUCT Structure

The MEASUREITEMSTRUCT data structure has the following form:

typedef struct tagMEASUREITEMSTRUCT {
    UINT   CtlType;
    UINT   CtlID;
    UINT   itemID;
    UINT   itemWidth;
    UINT   itemHeight;
    DWORD  itemData
} MEASUREITEMSTRUCT;

The MEASUREITEMSTRUCT structure informs Windows of the dimensions of an owner-drawn control or menu item. This allows Windows to process user interaction with the control correctly. Failure to fill out the proper members in the MEASUREITEMSTRUCT structure will cause improper operation of the control.

Members

CtlType

Contains the control type. The values for control types are as follows:

CtlID

Contains the control ID for a combo box, list box, or button. This member is not used for a menu.

itemID

Contains the menu-item ID for a menu or the list-box-item ID for a variable-height combo box or list box. This member is not used for a fixed-height combo box or list box, or for a button.

itemWidth

Specifies the width of a menu item. The owner of the owner-draw menu item must fill this member before it returns from the message.

itemHeight

Specifies the height of an individual item in a list box or a menu. Before it returns from the message, the owner of the owner-draw combo box, list box, or menu item must fill out this member. The maximum height of a list box item is 255.

itemData

For a combo box or list box, this member contains the value that was passed to the list box by one of the following:

See Also   CWnd::OnMeasureItem