dobj.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //
  2. // dobj.h: Declares data, defines and struct types for RecAct
  3. //          module.
  4. //
  5. //
  6. #ifndef __DOBJ_H__
  7. #define __DOBJ_H__
  8. // DOBJ is the draw object structure for drawing listbox entries
  9. //
  10. // DOBJ kinds
  11. //
  12. #define DOK_ICON        1   // lpvObject is the HICON
  13. #define DOK_STRING      2   // lpvObject is the LPCSTR
  14. #define DOK_BITMAP      3   // lpvObject is the HBITMAP
  15. #define DOK_SIDEITEM    4   // lpvObject points to LPSIDEITEM
  16. #define DOK_IMAGE       5   // 
  17. #define DOK_IDS         6   // lpvObject is the resource ID
  18. // DOBJ item styles
  19. //
  20. #define DOF_LEFT        0x0000
  21. #define DOF_CENTER      0x0001
  22. #define DOF_RIGHT       0x0002
  23. #define DOF_DIFFER      0x0004  // This item's appearance is affected by uState
  24. #define DOF_MENU        0x0008  // Use menu colors
  25. #define DOF_DISABLED    0x0010
  26. #define DOF_IGNORESEL   0x0020  // Ignore selection state
  27. #define DOF_USEIDS      0x0040  // lpvObject is a resource string ID
  28. #define DOF_NODRAW      0x1000  // Don't draw 
  29. typedef struct tagDOBJ
  30.     {
  31.     UINT    uKind;          // One of DOK_* ordinals
  32.     UINT    uFlags;         // One of DOF_* styles
  33.     LPVOID  lpvObject;      // ptr or handle
  34.     HIMAGELIST himl;        // 
  35.     int     iImage;         // 
  36.     int     x;
  37.     int     y;
  38.     RECT    rcBounding;     // Bounding rect of entire object
  39.     union 
  40.         {
  41.         RECT rcSrc;         // DOK_BITMAP: source rect to blt from
  42.         RECT rcClip;        // Clipping rect
  43.         RECT rcLabel;       // Clipping rect for label
  44.         };
  45.     } DOBJ,  * LPDOBJ;
  46. void PUBLIC Dobj_Draw(HDC hdc, LPDOBJ pdobj, int cItems, UINT uState, int cxEllipses, int cyText, COLORREF clrBkgnd);
  47. void PUBLIC ComputeImageRects(LPCTSTR psz, HDC hdc, LPPOINT ppt, LPRECT prcIcon, LPRECT prcLabel, int cxIcon, int cyIcon, int cxIconSpacing, int cyText);
  48. #endif // __DOBJ_H__