Annotation of pmsdk/samples/opendlg/opendlg.h, revision 1.1

1.1     ! root        1: /*
        !             2:     OPENDLG.H -- File Dialog include file
        !             3:     Created by Microsoft Corporation, 1989
        !             4: */
        !             5: 
        !             6: #define IDS_MERGE1      0      /* merge string (%%) */
        !             7: #define IDS_IFN         1      /* %% is not a valid filename. */
        !             8: #define IDS_FNF         2      /* %% not found - Create new file? */
        !             9: #define IDS_REF         3      /* Replace existing %%? */
        !            10: #define IDS_SCC         4      /* %% has changed. Save current changes? */
        !            11: #define IDS_EOF         5      /* Error opening %% */
        !            12: #define IDS_ECF         6      /* Error creating %% */
        !            13: 
        !            14: /* Dialog box IDs Open/Save IDs */
        !            15: #define IDD_FILEOPEN    -1
        !            16: #define IDD_FILESAVE    -2
        !            17: 
        !            18: #define ATTRDIRLIST     0x4010 /* include directories and drives in listbox */
        !            19: 
        !            20: #define MAX_FNAME_LEN     80
        !            21: #define CBEXTMAX           6
        !            22: #define CBROOTNAMEMAX    (MAX_FNAME_LEN - CBEXTMAX - 1)
        !            23: #define MAXMESSAGELENGTH 128 /* maximum cb     of a msg     (instruction
        !            24:                                 or warning). */
        !            25: 
        !            26: /* Action value for DlgFile, the values may be ORed, except DLG_OPENDLG */
        !            27: /* and DLG_SAVEDLG. */
        !            28: #define DLG_OPENDLG 0x00        /* Use the Open dialog box. */
        !            29: #define DLG_SAVEDLG 0x01        /* Use the Save (As) dialog box */
        !            30: #define DLG_NOOPEN  0x02        /* Don't Open the file we selected */
        !            31: #define DLG_HELP    0x04        /* The dialog box supports Help */
        !            32: 
        !            33: /* Return values from DlgFile : */
        !            34: #define TDF_ERRMEM   0
        !            35: #define TDF_INVALID  1
        !            36: #define TDF_NOOPEN   2
        !            37: #define TDF_NEWOPEN  3
        !            38: #define TDF_OLDOPEN  4
        !            39: #define TDF_NOSAVE   5
        !            40: #define TDF_NEWSAVE  6
        !            41: #define TDF_OLDSAVE  7
        !            42: 
        !            43: /* Flags for OpenFile */
        !            44: #define OF_REOPEN 0x8000
        !            45: #define OF_EXIST  0x4000
        !            46: #define OF_PROMPT 0x2000
        !            47: #define OF_CREATE 0x1000
        !            48: #define OF_CANCEL 0x0800
        !            49: #define OF_VERIFY 0x0400
        !            50: #define OF_DELETE 0x0200
        !            51: #define OF_PARSE  0x0100
        !            52: 
        !            53: #define OF_READ      0x0080
        !            54: #define OF_WRITE     0x0040
        !            55: #define OF_READWRITE 0x0020
        !            56: 
        !            57: /* flAttributes used to filter entries provided by DlgFillListBox */
        !            58: #define BITATTRDRIVE 0x4000
        !            59: #define BITATTRDIR   0x0010
        !            60: 
        !            61: 
        !            62: #ifndef RC_INVOKED
        !            63: 
        !            64: /* Useful abbreviations */
        !            65: typedef char *PSTR;
        !            66: typedef SHANDLE FAR *PHANDLE;
        !            67: 
        !            68: /* Data structure used to pass information to DlgFile(). */
        !            69: typedef struct _DLF {   /* dlf */
        !            70:         USHORT   rgbAction;             /* action usType:  eg. DLG_OPEN   */
        !            71:         USHORT   rgbFlags;              /* open file flAttributes         */
        !            72:         PHANDLE  phFile;                /* file handle                    */
        !            73:         PSZ      pszExt;                /* default file extension "\\.ext"*/
        !            74:         PSZ      pszAppName;            /* application name               */
        !            75:         PSZ      pszTitle;              /* panel title or NULL            */
        !            76:         PSZ      pszInstructions;       /* panel instructions or NULL     */
        !            77:         CHAR szFileName[MAX_FNAME_LEN]; /* relative file name             */
        !            78:         CHAR szOpenFile[MAX_FNAME_LEN]; /* full path name of current file */
        !            79:        CHAR szLastWild[MAX_FNAME_LEN]; /* last relative wild card name   */
        !            80:        CHAR szLastFile[MAX_FNAME_LEN]; /* last relative file name        */
        !            81: } DLF;
        !            82: typedef DLF *NPDLF;
        !            83: typedef DLF FAR *PDLF;
        !            84: 
        !            85: /*  Exported functions */
        !            86: VOID   CALLBACK LCopyStruct (PCH, PCH, int);
        !            87: VOID   CALLBACK LFillStruct (PCH, int, BYTE);
        !            88: int    CALLBACK lstrlen (PSZ);
        !            89: VOID   CALLBACK lstrcpy (PSZ, PSZ);
        !            90: VOID   CALLBACK lstrcat (PSZ, PSZ);
        !            91: int    CALLBACK lstrcmp (PSZ, PSZ);
        !            92: VOID   CALLBACK AddExt(PSZ, PSZ);
        !            93: PSZ    CALLBACK FileInPath(PSZ);
        !            94: ULONG  CALLBACK GetTextExtent (HPS, PCH, int);
        !            95: BOOL   CALLBACK MergeStrings(PSZ, PSZ, PSZ);
        !            96: BOOL   CALLBACK OpenFile(PSZ, PHANDLE, PSZ, USHORT);
        !            97: void   CALLBACK SetupDLF( PDLF, int, PHFILE, PSZ, PSZ, PSZ, PSZ);
        !            98: int    CALLBACK DlgFile(HWND, PDLF);
        !            99: int    CALLBACK AlertBox(HWND, int, PSZ, PSZ, USHORT, USHORT);
        !           100: 
        !           101: #endif

unix.superglobalmegacorp.com

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