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 structure provides information that the owner window must have to determine how to paint an owner-drawn control or menu item.
typedef struct tagDRAWITEMSTRUCT { UINT CtlType ; UINT CtlID ; UINT itemID ; UINT itemAction ; UINT itemState ; HWND hwndItem ; HDC hDC ; RECT rcItem ; ULONG_PTR itemData ; } DRAWITEMSTRUCT;
Members
Value | Description |
---|---|
ODT_BUTTON | Owner-drawn button |
ODT_LISTVIEW | Owner-draw list view control |
ODT_MENU | Owner-drawn menu |
ODT_TAB | Tab control |
Value | Description |
---|---|
ODA_DRAWENTIRE | The entire control needs to be drawn. |
ODA_FOCUS | The control has lost or gained the keyboard focus. You should check the itemStatemember to determine whether the control has the focus. |
ODA_SELECT | The selection status has changed. You should check the itemStatemember to determine the new selection state. |
Value | Description |
---|---|
ODS_CHECKED | The menu item is to be checked. Use this value only in a menu. |
ODS_COMBOBOXEDIT | The drawing takes place in the edit control of an owner-drawn combo box. |
ODS_DEFAULT | The item is the default item. |
ODS_DISABLED | The item is to be drawn as disabled. |
ODS_FOCUS | The item has the keyboard focus. |
ODS_GRAYED | The item is to be grayed. Use this value only in a menu. |
ODS_SELECTED | The status of the menu item is selected. |
If ctlTypeis ODT_BUTTON, itemDatais zero.
Remarks
The owner window of the owner-drawn control or menu item receives a pointer to this structure as the lParamparameter of the WM_DRAWITEMmessage.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Windows.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
CB_ADDSTRING, CB_INSERTSTRING, CB_SETITEMDATA, LB_ADDSTRING, LB_INSERTSTRING, LB_SETITEMDATA, WM_DRAWITEM