home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 3.ddi / OWLINC.ZIP / FILEDIAL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.8 KB  |  73 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. #ifndef __FILEDIAL_H
  4. #define __FILEDIAL_H
  5.  
  6. #ifndef __DIALOG_H
  7. #include <dialog.h>
  8. #endif
  9.  
  10. #ifndef __DIR_H
  11. #include <dir.h>
  12. #endif
  13.  
  14. #pragma option -Vo-
  15. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  16. #pragma option -po-
  17. #endif
  18.  
  19. #define FILESPEC    MAXPATH + MAXEXT
  20.  
  21. _CLASSDEF(TFileDialog)
  22.  
  23.   /* TFileDialog */
  24. class _EXPORT TFileDialog : public TDialog
  25. {
  26. public:
  27.     LPSTR FilePath;
  28.     char PathName[MAXPATH];
  29.     char Extension[MAXEXT];
  30.     char FileSpec[FILESPEC];
  31.  
  32.     TFileDialog(PTWindowsObject AParent, int ResourceId, LPSTR AFilePath,
  33.                 PTModule AModule = NULL);
  34.     virtual BOOL CanClose();
  35.     void SelectFileName();
  36.     void UpdateFileName();
  37.     BOOL UpdateListBoxes();
  38.  
  39.     static PTStreamable build();
  40.  
  41. protected:
  42.     virtual void SetupWindow();
  43.     virtual void HandleFName(RTMessage Msg)
  44.           = [ID_FIRST + ID_FNAME];
  45.     virtual void HandleFList(RTMessage Msg)
  46.           = [ID_FIRST + ID_FLIST];
  47.     virtual void HandleDList(RTMessage Msg)
  48.           = [ID_FIRST + ID_DLIST];
  49.  
  50.     TFileDialog(StreamableInit) : TDialog(streamableInit) {};
  51.  
  52. private:
  53.     virtual const Pchar streamableName() const
  54.         { return "TFileDialog"; }
  55. };
  56.  
  57. inline Ripstream operator >> ( Ripstream is, RTFileDialog cl )
  58.     { return is >> (RTStreamable )cl; }
  59. inline Ripstream operator >> ( Ripstream is, RPTFileDialog cl )
  60.     { return is >> (RPvoid)cl; }
  61.  
  62. inline Ropstream operator << ( Ropstream os, RTFileDialog cl )
  63.     { return os << (RTStreamable )cl; }
  64. inline Ropstream operator << ( Ropstream os, PTFileDialog cl )
  65.     { return os << (PTStreamable )cl; }
  66.  
  67. #pragma option -Vo.
  68. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  69. #pragma option -po.
  70. #endif
  71.  
  72. #endif
  73.