home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 5.ddi / RWCDEMO.ZIP / RWCDLG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.3 KB  |  55 lines

  1. // (C) Copyright 1991, 1992 by Borland International
  2.  
  3. #define fsPathName 80
  4. #define fsExtension 3
  5. #define fsFileSpec fsPathName+fsExtension
  6.  
  7. class TDialog
  8. {
  9. public:
  10.     HWND hWindow;
  11.     DLGPROC dialogFunc;
  12.         const char far *name;
  13.  
  14.     TDialog(int DlgName);
  15.     ~TDialog();
  16.     virtual BOOL setupDialog() { return TRUE;}
  17.     virtual void retrieveInfo() {};
  18.     virtual int doCommands(int Command, HWND hWndSource, UINT Notification);
  19.     virtual int canClose() {return 1;};
  20. };
  21.  
  22.  
  23. class TFileNew : public TDialog
  24. {
  25. public:
  26.   int *fileType;
  27.   TFileNew(int *aFileType) : TDialog(dlg_FileNew) { fileType = aFileType;};
  28.   int canClose();
  29.   BOOL setupDialog();
  30. };
  31.  
  32. class TFileOpen : public TDialog
  33. {
  34. public:
  35.     char *filePath;
  36.     char pathName[fsPathName + 1];
  37.     char extension[fsExtension + 1];
  38.     char fileSpec[fsFileSpec + 1];
  39.     int *fileType;
  40.  
  41.     TFileOpen(int *aType, char *aFilePath);
  42.     ~TFileOpen() {};
  43.     int canClose();
  44.     int hasWildCards(char *aFilePath) { return strchr(aFilePath, '*') || strchr(aFilePath, '?');};
  45.     char *getExtension(char *aFilePath);
  46.     char *getFileName(char *aFilePath);
  47.     char *getFileFirst(char *aFilePath);
  48.     BOOL setupDialog();
  49.     int doCommands(int Command, HWND hWndSource, UINT Notification);
  50.     void selectFileName();
  51.     void updateFileName();
  52.     void updateButtons();
  53.     int updateListBoxes();
  54. };
  55.