home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oclsrc15.zip / OCL / Include / ODialog.hpp < prev    next >
C/C++ Source or Header  |  1996-02-06  |  3KB  |  94 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // ODialog.hpp
  5.  
  6. // class definitions for ODialog
  7.  
  8. /*
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  15.  *    endorse or promote products derived from this software
  16.  *    without specific prior written permission.
  17.  * 3. See OCL.INF for a detailed copyright notice.
  18.  *
  19.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  20.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  23.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  25.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  26.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  27.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  28.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29.  * SUCH DAMAGE.
  30.  */
  31.  
  32. // $Header: E:/Projects/OCL/Include/rcs/ODialog.hpp 1.12 1996/01/16 10:12:18 B.STEIN Release B.STEIN $
  33.  
  34. #ifndef ODIALOG_INCLUDED
  35.   #define ODIALOG_INCLUDED
  36.  
  37.  
  38. #ifndef OWINDOW_INCLUDED
  39.   #include <OWindow.hpp>
  40. #endif
  41.  
  42.  
  43. #ifndef OPMEXCEPTION_INCLUDED
  44.   #include <OPMException.hpp>
  45. #endif
  46.  
  47.  
  48. #define CENTER_ONSCREEN 0
  49. #define CENTER_ONPARENT 1
  50.  
  51. typedef class ODialog *pODialog;
  52.  
  53. class __CPP_EXPORT__ ODialog
  54.   : public OWindow
  55. {
  56.  public:
  57.    HMODULE            module;
  58.  
  59.  public:
  60.     ODialog          (const ULONG idDlg);
  61.  
  62.     ODialog          (const HWND Parent,
  63.                       const HWND Owner,
  64.                       const ULONG idDlg);
  65.  
  66.     ODialog          (const HWND Parent,
  67.                       const HWND Owner,
  68.                       const HMODULE resource, 
  69.                       const ULONG idDlg);
  70.  
  71.     virtual
  72.        ~ODialog      ();
  73.  
  74.     virtual
  75.        PSZ isOfType  () const;
  76.  
  77.     ODialog
  78.        &createDlg    (),
  79.        &showDlg      (),
  80.        &dismissDlg   (BOOL success = TRUE),
  81.        &hideDlg      (),
  82.        &destroyDlg   (),
  83.        ¢erDlg    (const ULONG parentWindow = CENTER_ONSCREEN);
  84.  
  85.     BOOL showDlgModal();
  86. };
  87.  
  88.  
  89.  
  90.  
  91. #endif // ODIALOG_INCLUDED
  92.  
  93. // end of source
  94.