home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 11.ddi / OWLSRC.PAK / DECMDIFR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  2.1 KB  |  67 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1992, 1993 by Borland International
  3. //   source\owl\decmdifr.cpp
  4. //   Implementation of class TDecoratedMDIFrame
  5. //----------------------------------------------------------------------------
  6. #pragma hdrignore SECTION
  7. #include <owl\owlpch.h>
  8. #include <owl\decmdifr.h>
  9.  
  10. #if !defined(SECTION) || SECTION == 1
  11.  
  12. //
  13. // make sure that TDecoratedFrame is first in the list so we find its
  14. // WM_SIZE handler
  15. //
  16. DEFINE_RESPONSE_TABLE2(TDecoratedMDIFrame, TDecoratedFrame, TMDIFrame)
  17. END_RESPONSE_TABLE;
  18.  
  19. TDecoratedMDIFrame::TDecoratedMDIFrame(const char far* title,
  20.                                        TResId          menuResId,
  21.                                        TMDIClient&     clientWnd,
  22.                                        BOOL            trackMenuSelection,
  23.                                        TModule*        module)
  24.   : TMDIFrame(title, menuResId, clientWnd, module),
  25.     TDecoratedFrame(0, title, &clientWnd, trackMenuSelection, module),
  26.     TFrameWindow(0, title, &clientWnd, FALSE, module),
  27.     TWindow(0, title, module)
  28. {
  29. }
  30.  
  31. LRESULT
  32. TDecoratedMDIFrame::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
  33. {
  34.   //
  35.   // ::DefFrameProc() will response to WM_SIZE by making the MDI client the
  36.   // same size as the client rectangle; this conflicts with what TLayoutWindow
  37.   // has done
  38.   //
  39.   return message == WM_SIZE ?
  40.                       0 :
  41.                       TMDIFrame::DefWindowProc(message, wParam, lParam);
  42. }
  43.  
  44. #endif
  45. #if !defined(SECTION) || SECTION == 2
  46.  
  47.  
  48. IMPLEMENT_STREAMABLE4(TDecoratedMDIFrame, TMDIFrame, TDecoratedFrame,
  49.                       TFrameWindow, TWindow);
  50. void*
  51. TDecoratedMDIFrame::Streamer::Read(ipstream& is, uint32 /*version*/) const
  52. {
  53.   ReadBaseObject((TMDIFrame*)GetObject(), is);
  54.   ReadBaseObject((TDecoratedFrame*)GetObject(), is);
  55.   return GetObject();
  56. }
  57.  
  58. void
  59. TDecoratedMDIFrame::Streamer::Write(opstream& os) const
  60. {
  61.   WriteBaseObject((TMDIFrame*)GetObject(), os);
  62.   WriteBaseObject((TDecoratedFrame*)GetObject(), os);
  63. }
  64.  
  65. #endif
  66.  
  67.