The DRAWITEMSTRUCT structure provides information the owner window must have to determine how to paint an owner-drawn control or menu item. The owner window of the owner-drawn control or menu item receives a pointer to this structure as the lParam parameter of the WM_DRAWITEM message.
typedef struct tagDRAWITEMSTRUCT { // dis UINT CtlType; UINT CtlID; UINT itemID; UINT itemAction; UINT itemState; HWND hwndItem; HDC hDC; RECT rcItem; DWORD itemData; } DRAWITEMSTRUCT;
Value |
Meaning |
ODT_BUTTON |
Owner-drawn button |
ODT_COMBOBOX |
Owner-drawn combo box |
ODT_LISTBOX |
Owner-drawn list box |
ODT_LISTVIEW |
List view control |
ODT_MENU |
Owner-drawn menu item |
ODT_STATIC |
Owner-drawn static control |
ODT_TAB |
Tab control |
Value |
Meaning |
ODA_DRAWENTIRE |
The entire control needs to be drawn. |
ODA_FOCUS |
The control has lost or gained the keyboard focus. The itemState member should be checked to determine whether the control has the focus. |
ODA_SELECT |
The selection status has changed. The itemState member should be checked to determine the new selection state. |
Value |
Meaning |
ODS_CHECKED |
The menu item is to be checked. This bit is used only in a menu. |
ODS_COMBOBOXEDIT |
The drawing takes place in the selection field (edit control) of an ownerdrawn 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. This bit is used only in a menu. |
ODS_SELECTED |
The menu item’s status is selected. |
CB_ADDSTRING
CB_INSERTSTRING
LB_ADDSTRING
LB_INSERTSTRING
If ctlType is ODT_BUTTON or ODT_STATIC, itemData is zero.
CB_ADDSTRING, CB_INSERTSTRING, CB_SETITEMDATA, LB_ADDSTRING, LB_INSERTSTRING, LB_SETITEMDATA, WM_DRAWITEM
file: /Techref/os/win/api/win32/struc/src/str04_8.htm, 8KB, , updated: 2000/4/7 11:20, local time: 2024/11/8 05:45,
18.226.172.230:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/Techref/os/win/api/win32/struc/src/str04_8.htm"> DRAWITEMSTRUCT</A> |
Did you find what you needed? |