home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL1.ZIP / OWLINC.ZIP / FILEDIAL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  1.6 KB  |  63 lines

  1. // ObjectWindows - (C) Copyright 1991 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. #define FILESPEC    MAXPATH + MAXEXT
  15.  
  16. _CLASSDEF(TFileDialog)
  17.  
  18.   /* TFileDialog */
  19. class _EXPORT TFileDialog : public TDialog
  20. {
  21. public:
  22.     LPSTR FilePath;
  23.     char PathName[MAXPATH];
  24.     char Extension[MAXEXT];
  25.     char FileSpec[FILESPEC];
  26.  
  27.     TFileDialog(PTWindowsObject AParent, int ResourceId, LPSTR AFilePath, 
  28.                 PTModule AModule = NULL);
  29.     virtual BOOL CanClose();
  30.     void SelectFileName();
  31.     void UpdateFileName();
  32.     BOOL UpdateListBoxes();
  33.  
  34.     static PTStreamable build();
  35.  
  36. protected:
  37.     virtual void SetupWindow();
  38.     virtual void HandleFName(RTMessage Msg) 
  39.           = [ID_FIRST + ID_FNAME];
  40.     virtual void HandleFList(RTMessage Msg) 
  41.           = [ID_FIRST + ID_FLIST];
  42.     virtual void HandleDList(RTMessage Msg) 
  43.           = [ID_FIRST + ID_DLIST];
  44.  
  45.     TFileDialog(StreamableInit) : TDialog(streamableInit) {};
  46.  
  47. private:
  48.     virtual const Pchar streamableName() const
  49.         { return "TFileDialog"; }
  50. };
  51.  
  52. inline Ripstream operator >> ( Ripstream is, RTFileDialog cl )
  53.     { return is >> (RTStreamable )cl; }
  54. inline Ripstream operator >> ( Ripstream is, RPTFileDialog cl )
  55.     { return is >> (RPvoid)cl; }
  56.  
  57. inline Ropstream operator << ( Ropstream os, RTFileDialog cl )
  58.     { return os << (RTStreamable )cl; }
  59. inline Ropstream operator << ( Ropstream os, PTFileDialog cl )
  60.     { return os << (PTStreamable )cl; }
  61.  
  62. #endif
  63.