home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 September / dppcpro0998.iso / Rwc / Sybase / Install.exe / hpp.z / WMDICHLD.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  4.3 KB  |  132 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. /*************************************************************************
  12.  *
  13.  * WMDIChild -- Wrapper for the Windows 95 MDI child control.
  14.  *
  15.  *   Events:
  16.  *
  17.  *************************************************************************/
  18.  
  19. #ifndef _WMDICHLD_HPP_INCLUDED
  20. #define _WMDICHLD_HPP_INCLUDED
  21.  
  22. #ifndef _WNO_PRAGMA_PUSH
  23. #pragma pack(push,8);
  24. #pragma enum int;
  25. #endif
  26.  
  27. #ifndef _WFORM_HPP_INCLUDED
  28. #  include "wform.hpp"
  29. #endif
  30.  
  31. class WMDIParent;
  32.  
  33. class WCMCLASS WMDIChild : public WForm {
  34.     WDeclareSubclass( WMDIChild, WForm );
  35.     
  36.     public:
  37.  
  38.         /**************************************************************
  39.          * Constructors and Destructors
  40.          **************************************************************/
  41.  
  42.         WMDIChild();
  43.     
  44.         WMDIChild( WMDIParent * parent, WWindowHandle hdl=NULLHWND );
  45.     
  46.         virtual ~WMDIChild();
  47.  
  48.         /**************************************************************
  49.          * Properties
  50.          **************************************************************/
  51.  
  52.         // Active
  53.         //
  54.         //     Overrides the WForm behaviour and returns TRUE if the
  55.         //     window is the active MDI child.
  56.  
  57.         virtual WBool GetActive() const;
  58.  
  59.         /**************************************************************
  60.          * Methods
  61.          **************************************************************/
  62.  
  63.         // Activate
  64.         //
  65.         //     Overrides the WForm behaviour and activates the child.
  66.  
  67.         virtual WBool Activate() const;
  68.  
  69.         // Maximize
  70.  
  71.         WBool Maximize();
  72.  
  73.         // Restore
  74.  
  75.         WBool Restore();
  76.  
  77.         /**************************************************************
  78.          * Message processing
  79.          **************************************************************/
  80.         
  81.         virtual WBool ProcessMessage( const WMessage & msg,
  82.                                       WLong & returns );
  83.     
  84.         virtual WBool DefaultProcess( const WMessage & msg,
  85.                                       WLong & returns );
  86.     
  87.         /**************************************************************
  88.          * Others
  89.          **************************************************************/
  90.         
  91.         virtual int operator ==( const WMDIChild & obj ) const;
  92.         virtual int operator !=( const WMDIChild & obj ) const;
  93.  
  94.         WBool EraseBackgroundHandler( WWindow * window,
  95.                                       WPaintEventData * event );
  96.  
  97.         WBool PaintHandler( WWindow * window, WPaintEventData * event );
  98.  
  99.         WBool CreateHandler( WWindow * window, WEventData * event );
  100.  
  101.         /**************************************************************
  102.          * Overrides
  103.          **************************************************************/
  104.         
  105.         virtual WBool MakeWindow( WWindow * parent, WUInt id,
  106.                                   const WChar * className,
  107.                                   const WChar * title, const WRect & r,
  108.                                   WStyle wstyle, WStyle exStyle,
  109.                                   void * data=NULL );
  110.  
  111.         virtual WBool FilterMessage( WMessage & msg, WBool & eatMessage );
  112.  
  113.         // Destroy (overridden)
  114.  
  115.         virtual WBool Destroy();
  116.  
  117.         /**************************************************************
  118.          * Data members
  119.          **************************************************************/
  120.         
  121.     private:
  122.         WMDIParent *            _MDIParent;
  123.         WBool                   _createVisible;
  124. };
  125.  
  126. #ifndef _WNO_PRAGMA_PUSH
  127. #pragma enum pop;
  128. #pragma pack(pop);
  129. #endif
  130.  
  131. #endif // _WMDICHLD_HPP_INCLUDED
  132.