WM_MEASUREITEM

Version 3.0

This message is sent to the owner of an owner-draw button, combo box, list box, or menu item when the control is created. When the owner receives the message, the owner fills in the MEASUREITEM data structure pointed to by the lParam message parameter and returns; this informs Windows of the dimensions of the control. If a list box or combo box is created with the LBS_OWNERDRAWVARIABLE or CBS_OWNERDRAWVARIABLE style, this message is sent to the owner for each item in the control. Otherwise, this message is sent once.

Parameter

Description

 

wParam

Not used.

 

lParam

Contains a long pointer to a MEASUREITEMSTRUCT data structure that contains the dimensions of the owner-draw control.

 

Comments

Windows sends the WM_MEASUREITEM message to the owner of combo boxes and list boxes created with the OWNERDRAWFIXED style before sending WM_INITDIALOG.