home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / C / RICHCT / FLOPNDLG.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-19  |  1.3 KB  |  60 lines

  1. /*  Project richctrl
  2.     DHB Software
  3.     Copyright ⌐ 1996. All Rights Reserved.
  4.  
  5.     SUBSYSTEM:    richctrl.apx Application
  6.     FILE:         flopndlg.cpp
  7.     AUTHOR:       David H. Borg
  8.  
  9.  
  10.     OVERVIEW
  11.     ========
  12.     Source file for implementation of FileOpenDialog (TFileOpenDialog).      
  13. */
  14.  
  15. #include <owl\owlpch.h>
  16. #pragma hdrstop
  17.  
  18. #include "flopndlg.h"
  19.  
  20.  
  21. //{{FileOpenDialog Implementation}}
  22.  
  23.  
  24. FileOpenDialog::FileOpenDialog (TWindow* parent, TData& data, TResId templateId, const char far* title, TModule* module):
  25.     TFileOpenDialog(parent, data, templateId, title, module)
  26. {
  27.     // INSERT>> Your constructor code here.
  28.  
  29. }
  30.  
  31.  
  32. FileOpenDialog::~FileOpenDialog ()
  33. {
  34.     Destroy();
  35.  
  36.     // INSERT>> Your destructor code here.
  37.  
  38. }
  39.  
  40.  
  41. //  create new TFileOpenDialog DoExecute function
  42. int FileOpenDialog::DoExecute ()
  43. {
  44. //    disable OWL standard dialog procedure to let Windows 95 handle the messages
  45. //    (DLGPROC)ofn.lpfnHook = (DLGPROC)(FARPROC)StdDlgProcInstance;
  46.     ofn.lpfnHook = 0;
  47.     ofn.Flags &= ~(OFN_ENABLEHOOK);
  48.  
  49. // Procede with the rest of the function as per the OWL original class
  50.     int ret = ::GetOpenFileName(&ofn);
  51.     if (ret) {
  52.         Data.Flags = ofn.Flags;
  53.         Data.Error = 0;
  54.     } else {
  55.         Data.Error = ::CommDlgExtendedError();
  56.     }
  57.     return ret ? IDOK : IDCANCEL;
  58. }
  59.  
  60.