|
|
1.1 root 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: | |
14: | c o n s t a n t d e f i n i t i o n s |
15: | |
16: \*----------------------------------------------------------------------------*/
17:
1.1.1.2 ! root 18: #ifdef UNICODE
! 19: #define strcpy lstrcpy
! 20: #define strlen lstrlen
! 21: #endif
1.1 root 22: #include <mmsystem.h>
23:
24: #ifndef RC_INVOKED /* These are defined to RC */
25: #define STATICDT static
26: #define STATICFN static
27: #define STATIC static
28:
29: #if DBG
30: #undef STATICDT
31: #undef STATICFN
32: #undef STATIC
33: #define STATICDT
34: #define STATICFN
35: #define STATIC
36: #endif /* DBG */
37:
38: #endif /* RC_INVOKED */
39:
40: /* Resource IDs of the About box, main test box, and error box */
41:
42: #define IDD_ABOUTBOX 1 // Descriptive box
43: #define IDD_MCITEST 2 // Main dialog
44: #define IDD_ERRORDLG 3 // Error box dialog
45: #define IDD_DEVICES 4 // Device list dialog
46:
47: #define IDI_MCITEST 5 // Icon
48: #define IDM_MCITEST 6 // Menu
49: #define IDA_MCITEST 7 // Accelerator table
50:
51: /* Controls for main dialog
52: */
53: #include "mcimain.h"
54:
55: /* Menu IDs of the various menu options */
56:
57: #define MENU_ABOUT 20
58: #define MENU_EXIT 21
59: #define MENU_START_TEST 22
60:
61: #define MENU_OPEN 10
62: #define MENU_SAVE 11
63: #define MENU_SAVEAS 12
64:
65: #define MENU_DEVICES 30
66:
67: #if DBG
68: #define IDM_DEBUG0 1000
69: #define IDM_DEBUG1 1001
70: #define IDM_DEBUG2 1002
71: #define IDM_DEBUG3 1003
72: #define IDM_DEBUG4 1004
73: #endif
74:
75: typedef UINT MMMESSAGE;
76:
77: /* mcitest.c */
78:
1.1.1.2 ! root 79: extern TCHAR aszAppName[];
1.1 root 80: extern HWND hwndMainDlg;
81:
82: /* fileopen.c */
1.1.1.2 ! root 83: extern int DlgOpen(HANDLE hModule, HWND hParent, LPTSTR lpName, int count, UINT flags);
1.1 root 84:
85: /***************************************************************************
86:
87: DEBUGGING SUPPORT
88:
89: ***************************************************************************/
90:
91: #if DBG
92:
93: extern void dDbgSetDebugMenuLevel(int i);
1.1.1.2 ! root 94: extern void dDbgOut(LPTSTR lpszFormat, ...);
! 95: extern int dDbgGetLevel(LPTSTR lpszModule);
! 96: extern void dDbgSaveLevel(LPTSTR lpszModule, int level);
! 97: extern void dDbgAssert(LPTSTR exp, LPTSTR file, int line);
1.1 root 98:
99: extern int __iDebugLevel;
100: DWORD __dwEval;
101:
102: #define dGetDebugLevel(lpszModule) (__iDebugLevel = dDbgGetLevel(lpszModule))
103: #define dSaveDebugLevel(lpszModule) (dDbgSaveLevel(lpszModule, __iDebugLevel))
104:
1.1.1.2 ! root 105: #define dprintf( _x_ ) dDbgOut _x_
! 106: #define dprintf1( _x_ ) if (__iDebugLevel >= 1) dDbgOut _x_
! 107: #define dprintf2( _x_ ) if (__iDebugLevel >= 2) dDbgOut _x_
! 108: #define dprintf3( _x_ ) if (__iDebugLevel >= 3) dDbgOut _x_
! 109: #define dprintf4( _x_ ) if (__iDebugLevel >= 4) dDbgOut _x_
1.1 root 110:
111: #define WinAssert(exp) \
112: ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
113:
114: #define WinEval(exp) \
115: ((__dwEval=(DWORD)(exp)), \
116: __dwEval ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
117:
118: #else
119:
120: #define dGetDebugLevel(lpszModule) 0
121: #define dSaveDebugLevel(lpszModule) 0
122:
1.1.1.2 ! root 123: #define dprintf( _x_ )
! 124: #define dprintf1( _x_ )
! 125: #define dprintf2( _x_ )
! 126: #define dprintf3( _x_ )
! 127: #define dprintf4( _x_ )
1.1 root 128:
129: #define WinAssert(exp) 0
130: #define WinEval(exp) (exp)
131:
132: #endif
133:
134:
135: // stuff which is a bit bogus
136:
137: #ifndef GWW_HMODULE
138: #define GWW_HMODULE GWW_HINSTANCE
139: #endif
140:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.