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.

164 lines
3.6 KiB

  1. /*
  2. PlaySnd.h
  3. */
  4. #if DBG
  5. #define MEDIA_DEBUG
  6. #endif
  7. #include <mmsystem.h>
  8. #include "sounddlg.h"
  9. // menu ids
  10. #define IDD_ABOUT 96
  11. #define IDD_SOUNDDLG 97
  12. #define IDM_ABOUT 100
  13. #define IDM_EXIT 101
  14. #define IDM_PLAYFILE 102
  15. #define IDM_SOUNDS 201
  16. #define IDI_ICON 202
  17. #define IDM_MENU 203
  18. #define IDA_ACCTABLE 204
  19. #define IDM_DING 301
  20. #define IDM_SIREN 302
  21. #define IDM_LASER 303
  22. #define IDM_SYNC 401
  23. #define IDM_NOWAIT 402
  24. #define IDM_NODEFAULT 403
  25. #define IDM_RESOURCEID 408
  26. #define IDM_ICONHAND 501
  27. #define IDM_ICONQUESTION 502
  28. #define IDM_ICONEXCLAMATION 503
  29. #define IDM_ICONASTERISK 504
  30. #define IDM_SYNC_ICONHAND 505
  31. #define IDM_SYNC_ICONQUESTION 506
  32. #define IDM_SYNC_ICONEXCLAMATION 507
  33. #define IDM_SYNC_ICONASTERISK 508
  34. #define IDM_HELP_INDEX 901
  35. #define IDM_HELP_KEYBOARD 902
  36. #define IDM_HELP_HELP 903
  37. #ifdef MEDIA_DEBUG
  38. #define IDM_DEBUG0 1000
  39. #define IDM_DEBUG1 1001
  40. #define IDM_DEBUG2 1002
  41. #define IDM_DEBUG3 1003
  42. #define IDM_DEBUG4 1004
  43. #endif
  44. // string resource ids
  45. #define IDS_APPNAME 1 /* application (and class) name */
  46. // child window ids
  47. /* macros */
  48. /* extern declarations for various modules */
  49. /* main module */
  50. #define SIZEOFAPPNAME 20
  51. extern HANDLE ghModule;
  52. extern char szAppName[SIZEOFAPPNAME];
  53. extern HWND ghwndMain;
  54. extern BOOL bSync;
  55. extern BOOL bNoWait;
  56. extern BOOL bNoDefault;
  57. extern BOOL bResourceID;
  58. int APIENTRY MainWndProc(HWND, UINT, WPARAM ,LPARAM);
  59. void CommandMsg(HWND hWnd, DWORD wParam);
  60. // init.c
  61. extern BOOL InitApp(void);
  62. extern void CreateApp(HWND hWnd);
  63. extern void TerminateApp(void);
  64. extern void Error(LPSTR format, ...);
  65. /* about.c */
  66. extern void About(HWND hWnd);
  67. extern LONG AboutDlgProc(HWND, UINT, DWORD ,LONG);
  68. /* debug.c */
  69. #ifdef MEDIA_DEBUG
  70. extern void SetDebugMenuLevel(int i);
  71. #endif
  72. /* help.c */
  73. extern void Help(HWND hWnd, DWORD wParam);
  74. /* file.c */
  75. extern void PlayFile(void);
  76. /* sound.c */
  77. extern void Sounds(HWND hWnd);
  78. /* res.c */
  79. extern void Resource(DWORD wParam);
  80. /***************************************************************************
  81. DEBUGGING SUPPORT
  82. ***************************************************************************/
  83. #ifdef MEDIA_DEBUG
  84. extern void dDbgSetDebugMenuLevel(int i);
  85. extern void dDbgOut(LPSTR lpszFormat, ...);
  86. extern int dDbgGetLevel(LPSTR lpszModule);
  87. extern void dDbgSaveLevel(LPSTR lpszModule, int level);
  88. extern void dDbgAssert(LPSTR exp, LPSTR file, int line);
  89. int __iDebugLevel;
  90. DWORD __dwEval;
  91. #define dGetDebugLevel(lpszModule) (__iDebugLevel = dDbgGetLevel(lpszModule))
  92. #define dSaveDebugLevel(lpszModule) (dDbgSaveLevel(lpszModule, __iDebugLevel))
  93. #define dprintf( _x_ ) dDbgOut _x_
  94. #define dprintf1( _x_ ) if (__iDebugLevel >= 1) dDbgOut _x_
  95. #define dprintf2( _x_ ) if (__iDebugLevel >= 2) dDbgOut _x_
  96. #define dprintf3( _x_ ) if (__iDebugLevel >= 3) dDbgOut _x_
  97. #define dprintf4( _x_ ) if (__iDebugLevel >= 4) dDbgOut _x_
  98. #define WinAssert(exp) \
  99. ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
  100. #define WinEval(exp) \
  101. ((__dwEval=(DWORD)(exp)), \
  102. __dwEval ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
  103. #else
  104. #define dGetDebugLevel(lpszModule) 0
  105. #define dSaveDebugLevel(lpszModule) 0
  106. #define dprintf(x)
  107. #define dprintf1(x)
  108. #define dprintf2(x)
  109. #define dprintf3(x)
  110. #define dprintf4(x)
  111. #define WinAssert(exp) 0
  112. #define WinEval(exp) (exp)
  113. #endif