◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── typedef struct tagMEASUREITEMSTRUCT { WORD CtlType; WORD CtlID; WORD itemID; WORD itemWidth; WORD itemHeight; DWORD itemData } MEASUREITEMSTRUCT; The MEASUREITEMSTRUCT data structure informs Windows of the dimensions of an owner-draw control. This allows Windows to process user interaction with the control correctly. The owner of an owner-draw control receives a pointer to this structure as the <lParam> parameter of an WM_MEASUREITEM message. The owner-draw control sends this message to its owner window when the control is created; the owner then fills in the appropriate members in the structure for the control and returns. This structure is common to all owner-draw controls. Member Description CtlType Is the control type. The values for control types are as follows: Value Meaning ODT_BUTTON Owner-draw button. ODT_COMBOBOX Owner-draw combo box. ODT_LISTBOX Owner-draw list box. ODT_MENU Owner-draw menu. CtlID Is the control ID for a combo box, list box, or button. This member is not used for a menu. itemID Is 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 returning from the message. itemHeight Specifies the height of an individual item in a list box or a menu. Before returning 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 Contains the value that was passed to the combo box by ◄CComboBox::AddString► or ◄CComboBox::InsertString►, or passed to the list box by ◄CListBox::AddString► or ◄CListBox::InsertString►. Comments Failure to fill out the proper members in the MEASUREITEMSTRUCT structure will cause improper operation of the control. -♦-