Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.8 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // chklist.h - Definitions and prototypes for the checklist pseudo-control
  4. //
  5. // Copyright 1996, Microsoft Corporation
  6. //
  7. //
  8. //-----------------------------------------------------------------------------
  9. #ifndef _CHKLIST_H_
  10. #define _CHKLIST_H_
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif /* __cplusplus */
  14. //
  15. // CheckList window class name
  16. //
  17. #define WC_CHECKLIST "CHECKLIST_SCE"
  18. //
  19. // CheckList check states
  20. //
  21. #define CLST_UNCHECKED 0 // == BST_UNCHECKED
  22. #define CLST_CHECKED 1 // == BST_CHECKED
  23. #define CLST_DISABLED 2 // == BST_INDETERMINATE
  24. #define CLST_CHECKDISABLED (CLST_CHECKED | CLST_DISABLED)
  25. //
  26. // CheckList window styles
  27. //
  28. #define CLS_1CHECK 0x0001
  29. #define CLS_2CHECK 0x0002
  30. //#define CLS_3CHECK 0x0003
  31. //#define CLS_4CHECK 0x0004
  32. #define CLS_CHECKMASK 0x000f
  33. //
  34. // CheckList messages
  35. //
  36. // row is 0-based
  37. // column is 1-based
  38. //
  39. #define CLM_SETCOLUMNWIDTH (WM_USER + 1) // lParam = width (dlg units) of a check column (default=32)
  40. #define CLM_ADDITEM (WM_USER + 2) // wParam = pszName, lParam = item data, return = row
  41. #define CLM_GETITEMCOUNT (WM_USER + 3) // no parameters
  42. #define CLM_SETSTATE (WM_USER + 4) // wParam = row/column, lParam = state
  43. #define CLM_GETSTATE (WM_USER + 5) // wParam = row/column, return = state
  44. #define CLM_SETITEMDATA (WM_USER + 6) // wParam = row, lParam = item data
  45. #define CLM_GETITEMDATA (WM_USER + 7) // wParam = row, return = item data
  46. #define CLM_RESETCONTENT (WM_USER + 8) // no parameters
  47. #define CLM_GETVISIBLECOUNT (WM_USER + 9) // no parameters, return = # of visible rows
  48. #define CLM_GETTOPINDEX (WM_USER + 10) // no parameters, return = index of top row
  49. #define CLM_SETTOPINDEX (WM_USER + 11) // wParam = index of new top row
  50. #define CLM_ENSUREVISIBLE (WM_USER + 12) // wParam = index of item to make fully visible
  51. //
  52. // CheckList notification messages
  53. //
  54. #define CLN_CLICK (0U-1000U) // lparam = PNM_CHECKLIST
  55. typedef struct _NM_CHECKLIST
  56. {
  57. NMHDR hdr;
  58. int iItem; // row (0-based)
  59. int iSubItem; // column (1-based)
  60. DWORD dwState;
  61. DWORD_PTR dwItemData;
  62. } NM_CHECKLIST, *PNM_CHECKLIST;
  63. #define CBL_GetItemCount(x) (SendMessage(x, CLM_GETITEMCOUNT, 0,0))
  64. #define CBL_GetItemData(x,y) (SendMessage(x, CLM_GETITEMDATA,(WPARAM)y, 0))
  65. #define CBL_GetState(x, r, c) (SendMessage(x, CLM_GETSTATE, MAKEWPARAM(r, c), 0))
  66. #define CBL_SetState(x, r, c, s) (SendMessage(x, CLM_SETSTATE, MAKEWPARAM(r, c),(LPARAM)s))
  67. BOOL RegisterCheckListWndClass(void);
  68. #ifdef __cplusplus
  69. }
  70. #endif /* __cplusplus */
  71. #endif /* _CHKLIST_H_ */