Annotation of mstools/samples/mcitest/mcitest.h, revision 1.1

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

unix.superglobalmegacorp.com

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