Annotation of mstools/samples/playsnd/playsnd.h, revision 1.1.1.1

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
                     33: #define IDM_RESOURCEID         403
                     34: 
                     35: #define IDM_ICONHAND        501
                     36: #define IDM_ICONQUESTION    502
                     37: #define IDM_ICONEXCLAMATION 503
                     38: #define IDM_ICONASTERISK    504
                     39: #define IDM_SYNC_ICONHAND        505
                     40: #define IDM_SYNC_ICONQUESTION    506
                     41: #define IDM_SYNC_ICONEXCLAMATION 507
                     42: #define IDM_SYNC_ICONASTERISK    508
                     43: 
                     44: #define IDM_HELP_INDEX      901
                     45: #define IDM_HELP_KEYBOARD   902
                     46: #define IDM_HELP_HELP       903
                     47: 
                     48: #ifdef MEDIA_DEBUG
                     49: #define IDM_DEBUG0         1000
                     50: #define IDM_DEBUG1         1001
                     51: #define IDM_DEBUG2         1002
                     52: #define IDM_DEBUG3         1003
                     53: #define IDM_DEBUG4         1004
                     54: #endif
                     55: 
                     56: // string resource ids
                     57: 
                     58: #define IDS_APPNAME     1       /* application (and class) name */
                     59: 
                     60: // child window ids
                     61: 
                     62: /* macros */
                     63: 
                     64: 
                     65: /* extern declarations for various modules */
                     66: 
                     67: /* main module */
                     68: 
                     69: #define SIZEOFAPPNAME 20
                     70: extern HANDLE ghModule;
                     71: extern char szAppName[SIZEOFAPPNAME];
                     72: extern HWND ghwndMain;
                     73: extern BOOL bSync;
                     74: extern BOOL bNoWait;
                     75: extern BOOL bResourceID;
                     76: 
                     77: int APIENTRY MainWndProc(HWND, UINT, WPARAM ,LPARAM);
                     78: void CommandMsg(HWND hWnd, DWORD wParam);
                     79: 
                     80: // init.c
                     81: 
                     82: extern BOOL InitApp(void);
                     83: extern void CreateApp(HWND hWnd);
                     84: extern void TerminateApp(void);
                     85: extern void Error(LPSTR format, ...);
                     86: 
                     87: /* about.c */
                     88: 
                     89: extern void About(HWND hWnd);
                     90: extern LONG AboutDlgProc(HWND, UINT, DWORD ,LONG);
                     91: 
                     92: /* debug.c */
                     93: 
                     94: #ifdef MEDIA_DEBUG
                     95: extern void SetDebugMenuLevel(int i);
                     96: #endif
                     97: 
                     98: /* help.c */
                     99: 
                    100: extern void Help(HWND hWnd, DWORD wParam);
                    101: 
                    102: /* file.c */
                    103: 
                    104: extern void PlayFile(void);
                    105: 
                    106: /* sound.c */
                    107: 
                    108: extern void Sounds(HWND hWnd);
                    109: 
                    110: /* res.c */
                    111: 
                    112: extern void Resource(DWORD wParam);
                    113: 
                    114: /***************************************************************************
                    115: 
                    116:     DEBUGGING SUPPORT
                    117: 
                    118: ***************************************************************************/
                    119: 
                    120: 
                    121: #ifdef MEDIA_DEBUG
                    122: 
                    123:     extern void dDbgSetDebugMenuLevel(int i);
                    124:     extern void dDbgOut(LPSTR lpszFormat, ...);
                    125:     extern int  dDbgGetLevel(LPSTR lpszModule);
                    126:     extern void dDbgSaveLevel(LPSTR lpszModule, int level);
                    127:     extern void dDbgAssert(LPSTR exp, LPSTR file, int line);
                    128: 
                    129:     int __iDebugLevel;
                    130:     DWORD __dwEval;
                    131: 
                    132:     #define dGetDebugLevel(lpszModule) (__iDebugLevel = dDbgGetLevel(lpszModule))
                    133:     #define dSaveDebugLevel(lpszModule) (dDbgSaveLevel(lpszModule, __iDebugLevel))
                    134: 
                    135:     #define dprintf                          dDbgOut
                    136:     #define dprintf1 if (__iDebugLevel >= 1) dDbgOut
                    137:     #define dprintf2 if (__iDebugLevel >= 2) dDbgOut
                    138:     #define dprintf3 if (__iDebugLevel >= 3) dDbgOut
                    139:     #define dprintf4 if (__iDebugLevel >= 4) dDbgOut
                    140: 
                    141:     #define WinAssert(exp) \
                    142:         ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
                    143:     #define WinEval(exp) \
                    144:         ((__dwEval=(DWORD)(exp)),  \
                    145:                  __dwEval ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
                    146: 
                    147: #else
                    148: 
                    149:     #define dGetDebugLevel(lpszModule) 0
                    150:     #define dSaveDebugLevel(lpszModule) 0
                    151: 
                    152:     #define dprintf  if (0) ((int (*)(char *, ...)) 0)
                    153:     #define dprintf1 if (0) ((int (*)(char *, ...)) 0)
                    154:     #define dprintf2 if (0) ((int (*)(char *, ...)) 0)
                    155:     #define dprintf3 if (0) ((int (*)(char *, ...)) 0)
                    156:     #define dprintf4 if (0) ((int (*)(char *, ...)) 0)
                    157: 
                    158:     #define WinAssert(exp) 0
                    159:     #define WinEval(exp) (exp)
                    160: 
                    161: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.