Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This message is sent to the owner window of an owner-drawn button or menu item when the control or menu is created.
WM_MEASUREITEM idCtl= (UINT) wParam; lpmis= (LPMEASUREITEMSTRUCT) lParam;
Parameters
If the value is zero, the message was sent by a menu. If the value is nonzero, the message was sent by a combo box or by a list box. If the value is nonzero, and the value of the itemIDmember of the MEASUREITEMSTRUCTpointed to by lpmisis (UINT) –1, the message was sent by a combo edit field.
Return Values
An application should return TRUE if it processes this message.
Remarks
When the owner window receives the WM_MEASUREITEM message, the owner fills in the MEASUREITEMSTRUCTstructure pointed to by the lParamparameter of the message and returns; this informs the system 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.
The system sends the WM_MEASUREITEM message to the owner window of combo boxes and list boxes created with the OWNERDRAWFIXED style before sending the WM_INITDIALOG message. As a result, when the owner receives this message, the system has not yet determined the height and width of the font used in the control; function calls and calculations requiring these values should occur in the main function of the application or library.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also