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

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OBookPage.cpp
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30. // $Header: W:/Projects/OCL/Source/rcs/OBookPage.cpp 1.50 1996/08/11 23:49:08 B.STEIN Release $
  31.  
  32. #define __OCL_SOURCE__
  33.  
  34. #define OINCL_OSTRING
  35. #define OINCL_BASE
  36.  
  37. #include <ocl.hpp>
  38. #include <OBookPage.hpp>
  39.  
  40.  
  41. OBookPage::OBookPage(PSZ    StatusLineText, 
  42.                      PSZ    TabText,
  43.                      ULONG  DialogID,
  44.                      ULONG  FocusID,
  45.                      BOOL   isParentPage,
  46.                      USHORT TabType)
  47.  : szStatusLineText(StatusLineText),
  48.    szTabText(TabText),
  49.    idDlg(DialogID),
  50.    idFocus(FocusID),
  51.    fParent(isParentPage),
  52.    usTabType(TabType),
  53.    ulPageID(0)  
  54.  {}
  55.  
  56. OBookPage::~OBookPage()
  57.  {}
  58.  
  59. PSZ OBookPage::isOfType() const
  60. {
  61.  return("OBookPage");
  62. }
  63.  
  64.  
  65. BOOL OBookPage::OCommand(ULONG msg, MPARAM mp1, MPARAM mp2)
  66. {
  67.  switch(msg)
  68.   {
  69.    case WM_COMMAND:
  70.      break;
  71.  
  72.    case WM_CHAR:
  73.      if (((USHORT) SHORT1FROMMP(mp1)) & KC_ALT)
  74.        WinSetFocus(HWND_DESKTOP, WinQueryWindow(hwnd, QW_PARENT));
  75.      break;
  76.  
  77.    case WM_CLOSE:
  78.    case WM_DESTROY:
  79.      break;
  80.  
  81.    default:
  82.      return(FALSE);
  83.   }
  84.  return(TRUE);
  85. }
  86.  
  87.  
  88. // end of source
  89.