|
|
1.1 root 1: /*
2: PlaySnd.h
3: */
4: #if DBG
5: #define MEDIA_DEBUG
6: #endif
7:
8: #include <mmsystem.h>
9: #include "sounddlg.h"
10:
11: // menu ids
12:
13: #define IDD_ABOUT 96
14: #define IDD_SOUNDDLG 97
15:
16: #define IDM_ABOUT 100
17:
18: #define IDM_EXIT 101
19: #define IDM_PLAYFILE 102
20:
21: #define IDM_SOUNDS 201
22:
23: #define IDI_ICON 202
24: #define IDM_MENU 203
25: #define IDA_ACCTABLE 204
26:
27: #define IDM_DING 301
28: #define IDM_SIREN 302
29: #define IDM_LASER 303
30:
31: #define IDM_SYNC 401
32: #define IDM_NOWAIT 402
1.1.1.2 ! root 33: #define IDM_NODEFAULT 403
! 34:
! 35: #define IDM_RESOURCEID 408
1.1 root 36:
37: #define IDM_ICONHAND 501
38: #define IDM_ICONQUESTION 502
39: #define IDM_ICONEXCLAMATION 503
40: #define IDM_ICONASTERISK 504
41: #define IDM_SYNC_ICONHAND 505
42: #define IDM_SYNC_ICONQUESTION 506
43: #define IDM_SYNC_ICONEXCLAMATION 507
44: #define IDM_SYNC_ICONASTERISK 508
45:
46: #define IDM_HELP_INDEX 901
47: #define IDM_HELP_KEYBOARD 902
48: #define IDM_HELP_HELP 903
49:
50: #ifdef MEDIA_DEBUG
51: #define IDM_DEBUG0 1000
52: #define IDM_DEBUG1 1001
53: #define IDM_DEBUG2 1002
54: #define IDM_DEBUG3 1003
55: #define IDM_DEBUG4 1004
56: #endif
57:
58: // string resource ids
59:
60: #define IDS_APPNAME 1 /* application (and class) name */
61:
62: // child window ids
63:
64: /* macros */
65:
66:
67: /* extern declarations for various modules */
68:
69: /* main module */
70:
71: #define SIZEOFAPPNAME 20
72: extern HANDLE ghModule;
73: extern char szAppName[SIZEOFAPPNAME];
74: extern HWND ghwndMain;
75: extern BOOL bSync;
76: extern BOOL bNoWait;
1.1.1.2 ! root 77: extern BOOL bNoDefault;
1.1 root 78: extern BOOL bResourceID;
79:
80: int APIENTRY MainWndProc(HWND, UINT, WPARAM ,LPARAM);
81: void CommandMsg(HWND hWnd, DWORD wParam);
82:
83: // init.c
84:
85: extern BOOL InitApp(void);
86: extern void CreateApp(HWND hWnd);
87: extern void TerminateApp(void);
88: extern void Error(LPSTR format, ...);
89:
90: /* about.c */
91:
92: extern void About(HWND hWnd);
93: extern LONG AboutDlgProc(HWND, UINT, DWORD ,LONG);
94:
95: /* debug.c */
96:
97: #ifdef MEDIA_DEBUG
98: extern void SetDebugMenuLevel(int i);
99: #endif
100:
101: /* help.c */
102:
103: extern void Help(HWND hWnd, DWORD wParam);
104:
105: /* file.c */
106:
107: extern void PlayFile(void);
108:
109: /* sound.c */
110:
111: extern void Sounds(HWND hWnd);
112:
113: /* res.c */
114:
115: extern void Resource(DWORD wParam);
116:
117: /***************************************************************************
118:
119: DEBUGGING SUPPORT
120:
121: ***************************************************************************/
122:
123:
124: #ifdef MEDIA_DEBUG
125:
126: extern void dDbgSetDebugMenuLevel(int i);
127: extern void dDbgOut(LPSTR lpszFormat, ...);
128: extern int dDbgGetLevel(LPSTR lpszModule);
129: extern void dDbgSaveLevel(LPSTR lpszModule, int level);
130: extern void dDbgAssert(LPSTR exp, LPSTR file, int line);
131:
132: int __iDebugLevel;
133: DWORD __dwEval;
134:
135: #define dGetDebugLevel(lpszModule) (__iDebugLevel = dDbgGetLevel(lpszModule))
136: #define dSaveDebugLevel(lpszModule) (dDbgSaveLevel(lpszModule, __iDebugLevel))
137:
1.1.1.2 ! root 138: #define dprintf( _x_ ) dDbgOut _x_
! 139: #define dprintf1( _x_ ) if (__iDebugLevel >= 1) dDbgOut _x_
! 140: #define dprintf2( _x_ ) if (__iDebugLevel >= 2) dDbgOut _x_
! 141: #define dprintf3( _x_ ) if (__iDebugLevel >= 3) dDbgOut _x_
! 142: #define dprintf4( _x_ ) if (__iDebugLevel >= 4) dDbgOut _x_
1.1 root 143:
144: #define WinAssert(exp) \
145: ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
146: #define WinEval(exp) \
147: ((__dwEval=(DWORD)(exp)), \
148: __dwEval ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
149:
150: #else
151:
152: #define dGetDebugLevel(lpszModule) 0
153: #define dSaveDebugLevel(lpszModule) 0
154:
1.1.1.2 ! root 155: #define dprintf(x)
! 156: #define dprintf1(x)
! 157: #define dprintf2(x)
! 158: #define dprintf3(x)
! 159: #define dprintf4(x)
1.1 root 160:
161: #define WinAssert(exp) 0
162: #define WinEval(exp) (exp)
163:
164: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.