Source code of Windows XP (NT5)
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.

207 lines
11 KiB

  1. /**INC+**********************************************************************/
  2. /* */
  3. /* ddcgctyp.h */
  4. /* */
  5. /* DC-Groupware complex types - Windows 3.1 specific header. */
  6. /* */
  7. /* Copyright(c) Microsoft 1997 */
  8. /* */
  9. /****************************************************************************/
  10. /* Changes: */
  11. /* */
  12. /* $Log: Y:/logs/h/dcl/ddcgctyp.h_v $ */
  13. //
  14. // Rev 1.6 15 Sep 1997 18:28:26 AK
  15. // SFR1416: Move SD_BOTH definition
  16. //
  17. // Rev 1.5 14 Aug 1997 14:03:00 KH
  18. // SFR1022: Define (Ext)TextOutX macros
  19. //
  20. // Rev 1.4 24 Jul 1997 16:54:14 KH
  21. // SFR1033: Add GetLastError
  22. //
  23. // Rev 1.3 08 Jul 1997 08:46:52 KH
  24. // SFR1022: Add message parameter extraction macros
  25. //
  26. // Rev 1.2 25 Jun 1997 14:38:12 KH
  27. // Win16Port: 16-bit complex types
  28. //
  29. // Rev 1.1 19 Jun 1997 15:09:56 ENH
  30. // Win16Port: 16 bit specifics
  31. /* */
  32. /**INC-**********************************************************************/
  33. #ifndef _H_DDCGCTYP
  34. #define _H_DDCGCTYP
  35. /****************************************************************************/
  36. /* */
  37. /* INCLUDES */
  38. /* */
  39. /****************************************************************************/
  40. #include <toolhelp.h>
  41. #include <string.h>
  42. /****************************************************************************/
  43. /* */
  44. /* CONSTANTS */
  45. /* */
  46. /****************************************************************************/
  47. /****************************************************************************/
  48. /* Message box type flag unsupported on Win 3.x */
  49. /****************************************************************************/
  50. #define MB_SETFOREGROUND 0
  51. /****************************************************************************/
  52. /* Registry stuff not defined in standard 16-bit headers. */
  53. /****************************************************************************/
  54. /* from winreg.h */
  55. #define HKEY_CURRENT_USER (( HKEY ) 0x80000001 )
  56. #define HKEY_LOCAL_MACHINE (( HKEY ) 0x80000002 )
  57. /* from ntddk.h */
  58. #define REG_SZ ( 1 ) /* Unicode nul terminated string */
  59. #define REG_EXPAND_SZ ( 2 ) /* Unicode nul terminated string */
  60. /* (with environment variable references) */
  61. #define REG_BINARY ( 3 ) /* Free form binary */
  62. #define REG_DWORD ( 4 ) /* 32-bit number */
  63. /****************************************************************************/
  64. /* 32-bit scroll bar constants. */
  65. /****************************************************************************/
  66. #define SIF_RANGE 0x0001
  67. #define SIF_PAGE 0x0002
  68. #define SIF_POS 0x0004
  69. #define SIF_DISABLENOSCROLL 0x0008
  70. #define SIF_TRACKPOS 0x0010
  71. #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  72. /****************************************************************************/
  73. /* */
  74. /* TYPES */
  75. /* */
  76. /****************************************************************************/
  77. typedef MINMAXINFO DCPTR LPMINMAXINFO;
  78. typedef struct tagDCLARGEINTEGER
  79. {
  80. DCUINT32 LowPart;
  81. DCINT32 HighPart;
  82. } DCLARGEINTEGER;
  83. /****************************************************************************/
  84. /* Scroll bar info used by 32-bit API. */
  85. /****************************************************************************/
  86. typedef struct tagSCROLLINFO
  87. {
  88. DCUINT cbSize;
  89. DCUINT fMask;
  90. DCINT nMin;
  91. DCINT nMax;
  92. DCUINT nPage;
  93. DCINT nPos;
  94. DCINT nTrackPos;
  95. } SCROLLINFO, DCPTR LPSCROLLINFO;
  96. /****************************************************************************/
  97. /* Types which should not feature in a 16-bit build. Define to nonsense so */
  98. /* any 16-bit useage is caught at compile time. */
  99. /****************************************************************************/
  100. #define DCSURFACEID *** ERROR ***
  101. #define PDCSURFACEID *** ERROR ***
  102. /****************************************************************************/
  103. /* Types used by DC-Groupware tracing */
  104. /****************************************************************************/
  105. typedef DWORD HKEY;
  106. typedef struct tagDCFILETIME
  107. {
  108. DCUINT32 dwLowDateTime;
  109. DCUINT32 dwHighDateTime;
  110. } DCFILETIME;
  111. /****************************************************************************/
  112. /* */
  113. /* MACROS */
  114. /* */
  115. /****************************************************************************/
  116. /****************************************************************************/
  117. /* Unicode support for 16-bit client */
  118. /****************************************************************************/
  119. #define ExtTextOutW(a, b, c, d, e, f, g, h) \
  120. (ExtTextOut(a, b, c, d, e, f, g, h))
  121. #define ExtTextOutA(a, b, c, d, e, f, g, h) \
  122. (ExtTextOut(a, b, c, d, e, f, g, h))
  123. #define TextOutW(a, b, c, d, e) (TextOut(a, b, c, d, e))
  124. #define TextOutA(a, b, c, d, e) (TextOut(a, b, c, d, e))
  125. /****************************************************************************/
  126. /* String manipulation */
  127. /****************************************************************************/
  128. #define DC_CHARNEXT(pCurrentChar) (AnsiNext(pCurrentChar))
  129. #define DC_CHARPREV(pStringStart, pCurrentChar) \
  130. (AnsiPrev(pStringStart, pCurrentChar))
  131. #define DC_CHARLOWER(pString) (AnsiLower(pString))
  132. /****************************************************************************/
  133. /* Memory functions */
  134. /****************************************************************************/
  135. #define ZeroMemory(A,L) (DC_MEMSET(A,0,L))
  136. /****************************************************************************/
  137. /* Construct a 16-bit value fom two 8-bit values */
  138. /****************************************************************************/
  139. #define MAKEWORD(a, b) ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
  140. /****************************************************************************/
  141. /* No GetLastError support on win31 */
  142. /****************************************************************************/
  143. #define GetLastError() (0)
  144. /****************************************************************************/
  145. /* Message parameter extraction macros. */
  146. /****************************************************************************/
  147. /* WM_COMMAND */
  148. /* */
  149. /* 16-bit 32-bit */
  150. /* wParam command identifier notification code (HI), */
  151. /* command identifier (LO) */
  152. /* lParam control hwnd (HI), control hwnd */
  153. /* notification code (LO) */
  154. /****************************************************************************/
  155. #define DC_GET_WM_COMMAND_ID(wParam) (wParam)
  156. #define DC_GET_WM_COMMAND_NOTIFY_CODE(wParam, lParam) (HIWORD(lParam))
  157. #define DC_GET_WM_COMMAND_HWND(lParam) ((HWND)LOWORD(lParam))
  158. /****************************************************************************/
  159. /* WM_ACTIVATE */
  160. /* */
  161. /* 16-bit 32-bit */
  162. /* wParam activation flag minimized flag (HI), */
  163. /* activation flag (LO) */
  164. /* lParam minimized flag (HI), hwnd */
  165. /* hwnd (LO) */
  166. /****************************************************************************/
  167. #define DC_GET_WM_ACTIVATE_ACTIVATION(wParam) (wParam)
  168. #define DC_GET_WM_ACTIVATE_MINIMIZED(wParam, lParam) (HIWORD(lParam))
  169. #define DC_GET_WM_ACTIVATE_HWND(lParam) ((HWND)LOWORD(lParam))
  170. /****************************************************************************/
  171. /* WM_HSCROLL and WM_VSCROLL */
  172. /* */
  173. /* 16-bit 32-bit */
  174. /* wParam scroll code position (HI), */
  175. /* scroll code (LO) */
  176. /* lParam hwnd (HI), hwnd */
  177. /* position (LO) */
  178. /****************************************************************************/
  179. #define DC_GET_WM_SCROLL_CODE(wParam) (wParam)
  180. #define DC_GET_WM_SCROLL_POSITION(wParam, lParam) (LOWORD(lParam))
  181. #define DC_GET_WM_SCROLL_HWND(lParam) ((HWND)LOWORD(lParam))
  182. /****************************************************************************/
  183. /* */
  184. /* FUNCTION PROTOTYPES */
  185. /* */
  186. /****************************************************************************/
  187. extern DCVOID FAR PASCAL DOS3Call(DCVOID);
  188. #endif /* _H_DDCGCTYP */