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.

178 lines
5.2 KiB

  1. /*
  2. * GIZMOBAR.H
  3. * GizmoBar Version 1.00, Win32 version August 1993
  4. *
  5. * Public definitions for application that use the GizmoBar such as
  6. * messages, prototypes for API functions, notification codes, and
  7. * control styles.
  8. *
  9. * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  10. *
  11. * Kraig Brockschmidt, Software Design Engineer
  12. * Microsoft Systems Developer Relations
  13. *
  14. * Internet : kraigb@microsoft.com
  15. * Compuserve: >INTERNET:kraigb@microsoft.com
  16. */
  17. #ifndef _GIZMOBAR_H_
  18. #define _GIZMOBAR_H_
  19. #ifdef __cplusplus
  20. extern "C"
  21. {
  22. #endif
  23. //Classname
  24. #define CLASS_GIZMOBAR TEXT("gizmobar")
  25. //Message API Functions
  26. HWND WINAPI GBHwndAssociateSet(HWND, HWND);
  27. HWND WINAPI GBHwndAssociateGet(HWND);
  28. BOOL WINAPI GBGizmoAdd(HWND, UINT, UINT, UINT, UINT, UINT, LPTSTR, HBITMAP, UINT, UINT);
  29. BOOL WINAPI GBGizmoRemove(HWND, UINT);
  30. LRESULT WINAPI GBGizmoSendMessage(HWND, UINT, UINT, WPARAM, LPARAM);
  31. BOOL WINAPI GBGizmoShow(HWND, UINT, BOOL);
  32. BOOL WINAPI GBGizmoEnable(HWND, UINT, BOOL);
  33. BOOL WINAPI GBGizmoCheck(HWND, UINT, BOOL);
  34. UINT WINAPI GBGizmoFocusSet(HWND, UINT);
  35. BOOL WINAPI GBGizmoExist(HWND, UINT);
  36. int WINAPI GBGizmoTypeGet(HWND, UINT);
  37. DWORD WINAPI GBGizmoDataSet(HWND, UINT, DWORD);
  38. DWORD WINAPI GBGizmoDataGet(HWND, UINT);
  39. BOOL WINAPI GBGizmoNotifySet(HWND, UINT, BOOL);
  40. BOOL WINAPI GBGizmoNotifyGet(HWND, UINT);
  41. int WINAPI GBGizmoTextGet(HWND, UINT, LPTSTR, UINT);
  42. void WINAPI GBGizmoTextSet(HWND, UINT, LPTSTR);
  43. UINT WINAPI GBGizmoIntGet(HWND, UINT, BOOL FAR *, BOOL);
  44. void WINAPI GBGizmoIntSet(HWND, UINT, UINT, BOOL);
  45. //Notification codes sent via WM_COMMAND from GBHwndAssociateSet
  46. #define GBN_ASSOCIATEGAIN 1
  47. #define GBN_ASSOCIATELOSS 2
  48. #define GBN_GIZMOADDED 3
  49. #define GBN_GIZMOREMOVED 4
  50. //Message equivalents for functions.
  51. #define GBM_HWNDASSOCIATESET (WM_USER+0)
  52. #define GBM_HWNDASSOCIATEGET (WM_USER+1)
  53. #define GBM_GIZMOADD (WM_USER+2)
  54. #define GBM_GIZMOREMOVE (WM_USER+3)
  55. #define GBM_GIZMOSENDMESSAGE (WM_USER+4)
  56. #define GBM_GIZMOSHOW (WM_USER+5)
  57. #define GBM_GIZMOENABLE (WM_USER+6)
  58. #define GBM_GIZMOCHECK (WM_USER+7)
  59. #define GBM_GIZMOFOCUSSET (WM_USER+8)
  60. #define GBM_GIZMOEXIST (WM_USER+9)
  61. #define GBM_GIZMOTYPEGET (WM_USER+10)
  62. #define GBM_GIZMODATASET (WM_USER+11)
  63. #define GBM_GIZMODATAGET (WM_USER+12)
  64. #define GBM_GIZMONOTIFYSET (WM_USER+13)
  65. #define GBM_GIZMONOTIFYGET (WM_USER+14)
  66. #define GBM_GIZMOTEXTGET (WM_USER+15)
  67. #define GBM_GIZMOTEXTSET (WM_USER+16)
  68. #define GBM_GIZMOINTGET (WM_USER+17)
  69. #define GBM_GIZMOINTSET (WM_USER+18)
  70. /*
  71. * Structure passed in lParam of GBM_GIZMOADD that mirrors the parameters
  72. * to GBGizmoAdd.
  73. */
  74. typedef struct
  75. {
  76. HWND hWndParent; //Parent window
  77. UINT iType; //Type of gizmo
  78. UINT iGizmo; //Position in which to create gizmo
  79. UINT uID; //Identifier of gizmo (for WM_COMMAND messages)
  80. UINT dx; //Dimensions of gizmo
  81. UINT dy;
  82. LPTSTR pszText; //Gizmo text
  83. HBITMAP hBmp; //Source of gizmo button image.
  84. UINT iImage; //Index of image from hBmp
  85. UINT uState; //Initial state of the gizmo.
  86. } CREATEGIZMO, FAR *LPCREATEGIZMO;
  87. #define CBCREATEGIZMO sizeof(CREATEGIZMO)
  88. //For GBM_GIZMOSENDMESSAGE
  89. typedef struct
  90. {
  91. UINT iMsg;
  92. WPARAM wParam;
  93. LPARAM lParam;
  94. } GBMSG, FAR * LPGBMSG;
  95. #define CBGBMSG sizeof(GBMSG);
  96. //For GBM_GIZMOGETTEXT
  97. typedef struct
  98. {
  99. LPTSTR psz;
  100. UINT cch;
  101. } GBGETTEXT, FAR * LPGBGETTEXT;
  102. #define CBGBGETTEXT sizeof(GBGETTEXT);
  103. //For GBM_GIZMOGETINT
  104. typedef struct
  105. {
  106. BOOL fSigned;
  107. BOOL fSuccess;
  108. } GBGETINT, FAR * LPGBGETINT;
  109. #define CBGBGETINT sizeof(GBGETINT);
  110. //For GBM_GIZMOSETINT
  111. typedef struct
  112. {
  113. UINT uValue;
  114. BOOL fSigned;
  115. } GBSETINT, FAR * LPGBSETINT;
  116. #define CBGBSETINT sizeof(GBSETINT);
  117. //Gizmo control types. DO NOT CHANGE THESE!
  118. #define GIZMOTYPE_EDIT 0x0001
  119. #define GIZMOTYPE_LISTBOX 0x0002
  120. #define GIZMOTYPE_COMBOBOX 0x0004
  121. #define GIZMOTYPE_BUTTONNORMAL 0x0008 //Top of windowed gizmos.
  122. #define GIZMOTYPE_TEXT 0x0010
  123. #define GIZMOTYPE_SEPARATOR 0x0020
  124. #define GIZMOTYPE_BUTTONATTRIBUTEIN 0x0040
  125. #define GIZMOTYPE_BUTTONATTRIBUTEEX 0x0080
  126. #define GIZMOTYPE_BUTTONCOMMAND 0x0100
  127. //Generic state flags for non-buttons based on BTTNCUR.H's button groups.
  128. #define GIZMO_NORMAL (BUTTONGROUP_ACTIVE)
  129. #define GIZMO_DISABLED (BUTTONGROUP_DISABLED)
  130. #ifdef __cplusplus
  131. } //Match with extern "C" above.
  132. #endif
  133. #endif //_GIZMOBAR_H_