home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / owlsrc.pak / DECMDIFR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-24  |  2.1 KB  |  68 lines

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