home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / mmcaps / mmcaps.h < prev    next >
C/C++ Source or Header  |  1997-10-05  |  8KB  |  291 lines

  1. //==========================================================================;
  2. //
  3. //  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  4. //  ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  5. //  TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR
  6. //  A PARTICULAR PURPOSE.
  7. //
  8. //  Copyright (C) 1993 - 1997 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------;
  11. //
  12. //  mmcaps.h
  13. //
  14. //  Description:
  15. //
  16. //
  17. //  History:
  18. //      11/ 8/92
  19. //
  20. //==========================================================================;
  21.  
  22.  
  23. //
  24. //  NOTE! we keep a copy of MMREG.H in this project so we can update
  25. //  things by using 'diff'
  26. //
  27. #include "mmreg.h"
  28. #include "zyztlb.h"
  29.  
  30.  
  31. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  32. //
  33. //  Application Version Information:
  34. //
  35. //
  36. //
  37. //
  38. //  NOTE! all string resources that will be used in app.rcv for the
  39. //  version resource information *MUST* have an explicit \0 terminator!
  40. //
  41. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  42.  
  43. #define APP_VERSION_MAJOR        4
  44. #define APP_VERSION_MINOR           0
  45. #define APP_VERSION_BUILD           0
  46. #ifdef UNICODE
  47. #define APP_VERSION_STRING_RC        "Version 4.00 (Unicode Enabled)\0"
  48. #else
  49. #define APP_VERSION_STRING_RC        "Version 4.00\0"
  50. #endif
  51.  
  52. #ifdef WIN32
  53. #define APP_VERSION_NAME_RC         "mmcaps32.exe\0"
  54. #else
  55. #define APP_VERSION_NAME_RC         "mmcaps16.exe\0"
  56. #endif
  57. #define APP_VERSION_COMPANYNAME_RC  "Microsoft Corporation\0"
  58. #define APP_VERSION_COPYRIGHT_RC    "Copyright \251 Microsoft Corp. 1992-1995\0"
  59.  
  60. #ifdef WIN32
  61. #if (defined(_X86_)) || (defined(i386))
  62. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows NT (i386)\0"
  63. #endif
  64. #if (defined(_MIPS_)) || (defined(MIPS))
  65. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows NT (MIPS)\0"
  66. #endif
  67. #if (defined(_ALPHA_)) || (defined(ALPHA))
  68. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows NT (Alpha)\0"
  69. #endif
  70. #ifndef APP_VERSION_PRODUCTNAME_RC
  71. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows NT\0"
  72. #endif
  73. #else
  74. #define APP_VERSION_PRODUCTNAME_RC  "Microsoft Windows\0"
  75. #endif
  76.  
  77. #ifdef DEBUG
  78. #define APP_VERSION_DESCRIPTION_RC  "Multimedia Device Capabilities (debug)\0"
  79. #else
  80. #define APP_VERSION_DESCRIPTION_RC  "Multimedia Device Capabilities\0"
  81. #endif
  82.  
  83.  
  84. //
  85. //  Unicode versions (if UNICODE is defined)... the resource compiler
  86. //  cannot deal with the TEXT() macro.
  87. //
  88. #define APP_VERSION_STRING          TEXT(APP_VERSION_STRING_RC)
  89. #define APP_VERSION_NAME            TEXT(APP_VERSION_NAME_RC)
  90. #define APP_VERSION_COMPANYNAME     TEXT(APP_VERSION_COMPANYNAME_RC)
  91. #define APP_VERSION_COPYRIGHT       TEXT(APP_VERSION_COPYRIGHT_RC)
  92. #define APP_VERSION_PRODUCTNAME     TEXT(APP_VERSION_PRODUCTNAME_RC)
  93. #define APP_VERSION_DESCRIPTION     TEXT(APP_VERSION_DESCRIPTION_RC)
  94.  
  95.  
  96.  
  97.  
  98. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  99. //
  100. //  misc defines for misc sizes and things...
  101. //
  102. //
  103. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  104.  
  105. //
  106. //  bilingual. this allows the same identifier to be used in resource files
  107. //  and code without having to decorate the id in your code.
  108. //
  109. #ifdef RC_INVOKED
  110.     #define RCID(id)    id
  111. #else
  112.     #define RCID(id)    MAKEINTRESOURCE(id)
  113. #endif
  114.  
  115.  
  116. //
  117. //  misc. defines
  118. //
  119. #define APP_MAX_APP_NAME_CHARS      30
  120. #define APP_MAX_APP_NAME_BYTES      (APP_MAX_APP_NAME_CHARS * sizeof(TCHAR))
  121. #define APP_MAX_STRING_RC_CHARS     512
  122. #define APP_MAX_STRING_RC_BYTES     (APP_MAX_STRING_RC_CHARS * sizeof(TCHAR))
  123. #define APP_MAX_STRING_ERROR_CHARS  512
  124. #define APP_MAX_STRING_ERROR_BYTES  (APP_MAX_STRING_ERROR_CHARS * sizeof(TCHAR))
  125.  
  126. #define APP_WINDOW_XOFFSET          CW_USEDEFAULT
  127. #define APP_WINDOW_YOFFSET          CW_USEDEFAULT
  128. #define APP_WINDOW_WIDTH            500 //CW_USEDEFAULT
  129. #define APP_WINDOW_HEIGHT           300 //CW_USEDEFAULT
  130.  
  131.  
  132. //
  133. //
  134. //
  135. //
  136. #define MMCAPS_MAX_STRING_MID_CHARS 80
  137. #define MMCAPS_MAX_STRING_MID_BYTES (MMCAPS_MAX_STRING_MID_CHARS * sizeof(TCHAR))
  138. #define MMCAPS_MAX_STRING_PID_CHARS 128
  139. #define MMCAPS_MAX_STRING_PID_BYTES (MMCAPS_MAX_STRING_PID_CHARS * sizeof(TCHAR))
  140.  
  141. //
  142. //  max for pid or mid plus some
  143. //
  144. #define MMCAPS_MAX_STRING_MIDPID_CHARS  132
  145.  
  146.  
  147.  
  148. //
  149. //  resource defines...
  150. //
  151. #define ICON_APP                    RCID(10)
  152. #define ACCEL_APP                   RCID(15)
  153.  
  154.  
  155. //
  156. //  the application menu...
  157. //
  158. //
  159. #define MENU_APP                    RCID(20)
  160. #define APP_MENU_ITEM_FILE          0
  161. #define IDM_FILE_FONT               1000
  162. #define IDM_FILE_ABOUT              1009
  163. #define IDM_FILE_EXIT               1010
  164.  
  165. #define APP_MENU_ITEM_DRIVERS       1
  166. #define IDM_DRIVERS_LOWLEVEL        1050
  167. #define IDM_DRIVERS_MCI             1051
  168. #define IDM_DRIVERS_ACM             1052
  169. #define IDM_DRIVERS_VIDEO           1053
  170. #define IDM_DRIVERS_DRIVERS         1054
  171.  
  172. #define IDM_UPDATE                  1100
  173.  
  174.  
  175. //
  176. //
  177. //
  178. #define MMCAPS_DRIVERTYPE_LOWLEVEL  IDM_DRIVERS_LOWLEVEL
  179. #define MMCAPS_DRIVERTYPE_MCI       IDM_DRIVERS_MCI
  180. #define MMCAPS_DRIVERTYPE_ACM       IDM_DRIVERS_ACM
  181. #define MMCAPS_DRIVERTYPE_VIDEO     IDM_DRIVERS_VIDEO
  182. #define MMCAPS_DRIVERTYPE_DRIVERS   IDM_DRIVERS_DRIVERS
  183.  
  184.  
  185.  
  186. //
  187. //  the main window control id's...
  188. //
  189. #define IDD_APP_LIST_DEVICES        100
  190.  
  191.  
  192. //
  193. //  misc dlg boxes...
  194. //
  195. #define DLG_ABOUT                   RCID(50)
  196. #define IDD_ABOUT_VERSION_OS        100
  197. #define IDD_ABOUT_VERSION_PLATFORM  101
  198.  
  199. #define IDD_ABOUT_VERSION_MMSYSTEM  150
  200.  
  201.  
  202. #define DLG_DEVCAPS                 RCID(55)
  203. #define IDD_DEVCAPS_EDIT_DETAILS    100
  204.  
  205.  
  206.  
  207. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  208. //
  209. //  string resources
  210. //
  211. //
  212. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  213.  
  214. #define IDS_APP_NAME                100
  215.  
  216.  
  217.  
  218. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  219. //
  220. //  Public function prototypes
  221. //
  222. //
  223. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  224.  
  225. //
  226. //  mmcaps.c
  227. //
  228. //
  229. //
  230. int FNCGLOBAL AppMEditPrintF
  231. (
  232.     HWND            hedit,
  233.     PCTSTR          pszFormat,
  234.     ...
  235. );
  236.  
  237.  
  238.  
  239.  
  240. //
  241. //  midspids.c
  242. //
  243. //
  244. //
  245. BOOL FNGLOBAL MMCapsMidAndPid
  246. (
  247.     UINT            uMid,
  248.     PTSTR           pszMid,
  249.     UINT            uPid,
  250.     PTSTR           pszPid
  251. );
  252.  
  253.  
  254.  
  255. //
  256. //
  257. //
  258. //
  259. BOOL FNGLOBAL MMCapsEnumerateLowLevel(PZYZTABBEDLISTBOX ptlb, BOOL fComplete);
  260. BOOL FNGLOBAL MMCapsEnumerateMCI(PZYZTABBEDLISTBOX ptlb, BOOL fComplete);
  261. BOOL FNGLOBAL MMCapsEnumerateACM(PZYZTABBEDLISTBOX ptlb, BOOL fComplete);
  262. BOOL FNGLOBAL MMCapsEnumerateVideo(PZYZTABBEDLISTBOX ptlb, BOOL fComplete);
  263. BOOL FNGLOBAL MMCapsEnumerateDrivers(PZYZTABBEDLISTBOX ptlb, BOOL fComplete);
  264.  
  265. BOOL FNGLOBAL MMCapsDetailLowLevel(HWND hedit, LPARAM lParam);
  266. BOOL FNGLOBAL MMCapsDetailMCI(HWND hedit, LPARAM lParam);
  267. BOOL FNGLOBAL MMCapsDetailACM(HWND hedit, LPARAM lParam);
  268. BOOL FNGLOBAL MMCapsDetailVideo(HWND hedit, LPARAM lParam);
  269.  
  270.  
  271. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  272. //
  273. //  global variables, etc.
  274. //
  275. //
  276. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  277.  
  278. extern HINSTANCE    ghinst;
  279.  
  280. extern TCHAR        gszAppSection[];
  281. extern TCHAR        gszNull[];
  282.  
  283. extern TCHAR        gszAppName[APP_MAX_APP_NAME_CHARS];
  284.  
  285.  
  286. //
  287. //
  288. //
  289. extern TCHAR        gszUnknown[];
  290. extern TCHAR        gszNotSpecified[];
  291.