home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WMDICHLD.HPP < prev    next >
C/C++ Source or Header  |  1997-01-23  |  4KB  |  136 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.  *       Activate
  18.  *
  19.  *       Deactivate
  20.  *
  21.  *************************************************************************/
  22.  
  23. #ifndef _WMDICHLD_HPP_INCLUDED
  24. #define _WMDICHLD_HPP_INCLUDED
  25.  
  26. #ifndef _WNO_PRAGMA_PUSH
  27. #pragma pack(push,8);
  28. #pragma enum int;
  29. #endif
  30.  
  31. #ifndef _WFORM_HPP_INCLUDED
  32. #  include "wform.hpp"
  33. #endif
  34.  
  35. class WMDIParent;
  36.  
  37. class WCMCLASS WMDIChild : public WForm {
  38.     WDeclareSubclass( WMDIChild, WForm );
  39.     
  40.     public:
  41.  
  42.         /**************************************************************
  43.          * Constructors and Destructors
  44.          **************************************************************/
  45.  
  46.         WMDIChild();
  47.     
  48.         WMDIChild( WMDIParent * parent, WWindowHandle hdl=NULLHWND );
  49.     
  50.         virtual ~WMDIChild();
  51.  
  52.         /**************************************************************
  53.          * Properties
  54.          **************************************************************/
  55.  
  56.         // Active
  57.         //
  58.         //     Overrides the WForm behaviour and returns TRUE if the
  59.         //     window is the active MDI child.
  60.  
  61.         virtual WBool GetActive() const;
  62.  
  63.         /**************************************************************
  64.          * Methods
  65.          **************************************************************/
  66.  
  67.         // Activate
  68.         //
  69.         //     Overrides the WForm behaviour and activates the child.
  70.  
  71.         virtual WBool Activate() const;
  72.  
  73.         // Maximize
  74.  
  75.         WBool Maximize();
  76.  
  77.         // Restore
  78.  
  79.         WBool Restore();
  80.  
  81.         /**************************************************************
  82.          * Message processing
  83.          **************************************************************/
  84.         
  85.         virtual WBool ProcessMessage( const WMessage & msg,
  86.                                       WLong & returns );
  87.     
  88.         virtual WBool DefaultProcess( const WMessage & msg,
  89.                                       WLong & returns );
  90.     
  91.         /**************************************************************
  92.          * Others
  93.          **************************************************************/
  94.         
  95.         virtual int operator ==( const WMDIChild & obj ) const;
  96.         virtual int operator !=( const WMDIChild & obj ) const;
  97.  
  98.         WBool EraseBackgroundHandler( WWindow * window,
  99.                                       WPaintEventData * event );
  100.  
  101.         WBool PaintHandler( WWindow * window, WPaintEventData * event );
  102.  
  103.         WBool CreateHandler( WWindow * window, WEventData * event );
  104.  
  105.         /**************************************************************
  106.          * Overrides
  107.          **************************************************************/
  108.         
  109.         virtual WBool MakeWindow( WWindow * parent, WUInt id,
  110.                                   const WChar * className,
  111.                                   const WChar * title, const WRect & r,
  112.                                   WStyle wstyle, WStyle exStyle,
  113.                                   void * data=NULL );
  114.  
  115.         virtual WBool FilterMessage( WMessage & msg, WBool & eatMessage );
  116.  
  117.         // Destroy (overridden)
  118.  
  119.         virtual WBool Destroy();
  120.  
  121.         /**************************************************************
  122.          * Data members
  123.          **************************************************************/
  124.         
  125.     private:
  126.         WMDIParent *            _MDIParent;
  127.         WBool                   _createVisible;
  128. };
  129.  
  130. #ifndef _WNO_PRAGMA_PUSH
  131. #pragma enum pop;
  132. #pragma pack(pop);
  133. #endif
  134.  
  135. #endif // _WMDICHLD_HPP_INCLUDED
  136.