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.

81 lines
2.6 KiB

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