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

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OMsgs.hpp
  5. // Message Boxes
  6.  
  7. /*
  8.  * Redistribution and use in source and binary forms, with or without
  9.  * modification, are permitted provided that the following conditions
  10.  * are met:
  11.  * 1. Redistributions of source code must retain the above copyright
  12.  *    notice, this list of conditions and the following disclaimer.
  13.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  14.  *    endorse or promote products derived from this software
  15.  *    without specific prior written permission.
  16.  * 3. See OCL.INF for a detailed copyright notice.
  17.  *
  18.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  19.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  22.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  24.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28.  * SUCH DAMAGE.
  29.  */
  30.  
  31. // $Header: W:/Projects/OCL/Include/rcs/OMsgs.hpp 1.50 1996/08/11 23:47:22 B.STEIN Release $
  32.  
  33. #ifndef OMSGS_INCLUDED
  34.   #define OMSGS_INCLUDED
  35.  
  36. #ifndef OAPP_INCLUDED
  37.   #include <OApp.hpp>
  38. #endif
  39.  
  40. typedef class OMsgs *pOMsgs;
  41.  
  42. class __CPP_EXPORT__ OMsgs
  43.   : public OCLObject
  44. {
  45.  private:
  46.    HWND            Parent;
  47.    HWND            Owner;
  48.  
  49.  protected:
  50.    HMODULE         handle;
  51.    CHAR            Msg[2*CCHMAXPATH];
  52.    CHAR            Title[60];
  53.  
  54.  public:
  55.  
  56.    OMsgs           (const HMODULE moduleHandle = NULLHANDLE,
  57.                     const HWND parent          = HWND_DESKTOP,
  58.                     const HWND owner           = HWND_DESKTOP);
  59.  
  60.    virtual
  61.       ~OMsgs       ();
  62.  
  63.    virtual
  64.       PSZ isOfType () const; 
  65.  
  66.    PSZ 
  67.       message      (),
  68.       title        ();
  69.  
  70.    void
  71.       setResource  (const HMODULE moduleHandle = NULLHANDLE),
  72.       info         (const ULONG msgID),
  73.       info         (const ULONG titleID, const ULONG msgID),
  74.       info         (PCSZ msg),
  75.       info         (PCSZ title, PCSZ msg),
  76.       error        (const ULONG msgID),
  77.       error        (const ULONG titleID, const ULONG msgID),
  78.       error        (PCSZ msg),
  79.       error        (PCSZ title, PCSZ msg),
  80.       beeper       ();
  81.  
  82.    BOOL
  83.       ask          (const ULONG titleID, const ULONG msgID),
  84.       ask          (PCSZ title, PCSZ msg),
  85.       loadString   (const ULONG resID, const ULONG Size, PSZ str);
  86.  
  87.    inline operator
  88.       HMODULE      () const { return(handle); }
  89. };
  90.  
  91. #endif  // OMSGS_INCLUDED
  92.  
  93.  
  94.  
  95. // end of source
  96.