|
|
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 CCHMAXPATH ! 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: ! 58: #ifndef RC_INVOKED ! 59: ! 60: /* Useful abbreviations */ ! 61: typedef char *PSTR; ! 62: typedef SHANDLE FAR *PHANDLE; ! 63: ! 64: /* Data structure used to pass information to DlgFile(). */ ! 65: typedef struct _DLF { /* dlf */ ! 66: USHORT rgbAction; /* action usType: eg. DLG_OPEN */ ! 67: USHORT rgbFlags; /* open file flAttributes */ ! 68: PHANDLE phFile; /* file handle */ ! 69: PSZ pszExt; /* default file extension "\\.ext"*/ ! 70: PSZ pszAppName; /* application name */ ! 71: PSZ pszTitle; /* panel title or NULL */ ! 72: PSZ pszInstructions; /* panel instructions or NULL */ ! 73: CHAR szFileName[MAX_FNAME_LEN]; /* relative file name */ ! 74: CHAR szOpenFile[MAX_FNAME_LEN]; /* full path name of current file */ ! 75: CHAR szLastWild[MAX_FNAME_LEN]; /* last relative wild card name */ ! 76: CHAR szLastFile[MAX_FNAME_LEN]; /* last relative file name */ ! 77: } DLF; ! 78: typedef DLF *NPDLF; ! 79: typedef DLF FAR *PDLF; ! 80: ! 81: /* Exported functions */ ! 82: VOID EXPENTRY AddExt(PSZ, PSZ); ! 83: PSZ EXPENTRY FileInPath(PSZ); ! 84: ULONG EXPENTRY GetTextExtent (HPS, PCH, int); ! 85: BOOL EXPENTRY MergeStrings(PSZ, PSZ, PSZ); ! 86: BOOL EXPENTRY OpenFile(PSZ, PHANDLE, PSZ, USHORT); ! 87: void EXPENTRY SetupDLF( PDLF, int, PHFILE, PSZ, PSZ, PSZ, PSZ); ! 88: int EXPENTRY DlgFile(HWND, PDLF); ! 89: int EXPENTRY AlertBox(HWND, int, PSZ, PSZ, USHORT, USHORT); ! 90: ! 91: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.