DRAWITEMSTRUCT结构体解析.docVIP

  • 3
  • 0
  • 约2.37千字
  • 约 3页
  • 2018-06-26 发布于河南
  • 举报
DRAWITEMSTRUCT结构体解析

DRAWITEMSTRUCT   来由:DRAWITEMSTRUCT 为需要自绘的控件或者菜单项提供了必要的信息。在需要绘制的控件或者菜单项对应的WM_DRAWITEM消息函数中得到一个指向该结构的指针。   例子:   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); (.h中声明)   void CColorButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) (.cpp中定义)   这里LPDRAWITEMSTRUCT即指向DRAWITEMSTRUCT结构体的指针。   DRAWITEMSTRUCT结构的定义如下:   typedef struct tagDRAWITEMSTRUCT {   UINT CtlType;   UINT CtlID;   UINT itemID;   UINT itemAction;   UINT itemState;   HWND hwndItem;   HDC hDC;   RECT rcItem;   ULONG_PTR itemData;   } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;结构成员:   成员:

文档评论(0)

1亿VIP精品文档

相关文档