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.

140 lines
4.2 KiB

  1. /*----------------------------------------------------------------------------*\
  2. | mcitest.h - menu definitions, etc. for MCI test |
  3. | |
  4. | |
  5. | History: |
  6. | 01/01/88 toddla Created |
  7. | 11/04/90 w-dougb Commented & formatted the code to look pretty |
  8. | 05/29/91 NigelT Ported to Win32
  9. | |
  10. \*----------------------------------------------------------------------------*/
  11. /*----------------------------------------------------------------------------*\
  12. | |
  13. | c o n s t a n t d e f i n i t i o n s |
  14. | |
  15. \*----------------------------------------------------------------------------*/
  16. #ifdef UNICODE
  17. #define strcpy lstrcpy
  18. #define strlen lstrlen
  19. #endif
  20. #include <mmsystem.h>
  21. #ifndef RC_INVOKED /* These are defined to RC */
  22. #define STATICDT static
  23. #define STATICFN static
  24. #define STATIC static
  25. #if DBG
  26. #undef STATICDT
  27. #undef STATICFN
  28. #undef STATIC
  29. #define STATICDT
  30. #define STATICFN
  31. #define STATIC
  32. #endif /* DBG */
  33. #endif /* RC_INVOKED */
  34. /* Resource IDs of the About box, main test box, and error box */
  35. #define IDD_ABOUTBOX 1 // Descriptive box
  36. #define IDD_MCITEST 2 // Main dialog
  37. #define IDD_ERRORDLG 3 // Error box dialog
  38. #define IDD_DEVICES 4 // Device list dialog
  39. #define IDI_MCITEST 5 // Icon
  40. #define IDM_MCITEST 6 // Menu
  41. #define IDA_MCITEST 7 // Accelerator table
  42. /* Controls for main dialog
  43. */
  44. #include "mcimain.h"
  45. /* Menu IDs of the various menu options */
  46. #define MENU_ABOUT 20
  47. #define MENU_EXIT 21
  48. #define MENU_START_TEST 22
  49. #define MENU_OPEN 10
  50. #define MENU_SAVE 11
  51. #define MENU_SAVEAS 12
  52. #define MENU_DEVICES 30
  53. #if DBG
  54. #define IDM_DEBUG0 1000
  55. #define IDM_DEBUG1 1001
  56. #define IDM_DEBUG2 1002
  57. #define IDM_DEBUG3 1003
  58. #define IDM_DEBUG4 1004
  59. #endif
  60. typedef UINT MMMESSAGE;
  61. /* mcitest.c */
  62. extern TCHAR aszAppName[];
  63. extern HWND hwndMainDlg;
  64. /* fileopen.c */
  65. extern int DlgOpen(HANDLE hModule, HWND hParent, LPTSTR lpName, int count, UINT flags);
  66. /***************************************************************************
  67. DEBUGGING SUPPORT
  68. ***************************************************************************/
  69. #if DBG
  70. extern void dDbgSetDebugMenuLevel(int i);
  71. extern void dDbgOut(LPTSTR lpszFormat, ...);
  72. extern int dDbgGetLevel(LPTSTR lpszModule);
  73. extern void dDbgSaveLevel(LPTSTR lpszModule, int level);
  74. extern void dDbgAssert(LPTSTR exp, LPTSTR file, int line);
  75. extern int __iDebugLevel;
  76. DWORD __dwEval;
  77. #define dGetDebugLevel(lpszModule) (__iDebugLevel = dDbgGetLevel(lpszModule))
  78. #define dSaveDebugLevel(lpszModule) (dDbgSaveLevel(lpszModule, __iDebugLevel))
  79. #define dprintf( _x_ ) dDbgOut _x_
  80. #define dprintf1( _x_ ) if (__iDebugLevel >= 1) dDbgOut _x_
  81. #define dprintf2( _x_ ) if (__iDebugLevel >= 2) dDbgOut _x_
  82. #define dprintf3( _x_ ) if (__iDebugLevel >= 3) dDbgOut _x_
  83. #define dprintf4( _x_ ) if (__iDebugLevel >= 4) dDbgOut _x_
  84. #define WinAssert(exp) \
  85. ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
  86. #define WinEval(exp) \
  87. ((__dwEval=(DWORD)(exp)), \
  88. __dwEval ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
  89. #else
  90. #define dGetDebugLevel(lpszModule) 0
  91. #define dSaveDebugLevel(lpszModule) 0
  92. #define dprintf( _x_ )
  93. #define dprintf1( _x_ )
  94. #define dprintf2( _x_ )
  95. #define dprintf3( _x_ )
  96. #define dprintf4( _x_ )
  97. #define WinAssert(exp) 0
  98. #define WinEval(exp) (exp)
  99. #endif
  100. // stuff which is a bit bogus
  101. #ifndef GWW_HMODULE
  102. #define GWW_HMODULE GWW_HINSTANCE
  103. #endif