home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / smframe.cp_ / smframe.cp
Encoding:
Text File  |  1994-09-06  |  1.4 KB  |  60 lines

  1. //    Microworks ObjectMate  2.6
  2. //
  3. //  "SFX Class Library"
  4. //
  5. //    An ObjectWindows 2.0 extension for Borland C++ 4.0
  6. //
  7. //    Copyright 1992-94 Microworks Sydney, Australia.
  8. //
  9. //  SMFRAME.CPP
  10.  
  11. #include <owl\owlpch.h>
  12. #include <sfx\sfx200.h>
  13. #include <sfx\smdi.h>
  14.  
  15. DEFINE_RESPONSE_TABLE2(TSFXMDIFrame, TMDIFrame, TFrameWindow)
  16. END_RESPONSE_TABLE;
  17.  
  18. // constructor for a TSFXMDIFrame
  19.  
  20. TSFXMDIFrame::TSFXMDIFrame(const char far* title,
  21.                            TResId          menuResId,
  22.                            TMDIClient&     clientWnd,
  23.                            BOOL            sfxFrame,
  24.                            BOOL            sfxCaption,
  25.                            TModule*        module)
  26.     :TMDIFrame(title, menuResId, clientWnd, module)
  27. {
  28.     TWindow::Init(0, title, module);
  29.     TFrameWindow::Init(&clientWnd, FALSE);
  30.     if (sfxFrame)
  31.         Attr.Style |= MWS_SFXFRAME;
  32.     else
  33.         Attr.Style |= MWS_3DFRAME;
  34.     if (sfxCaption)
  35.         Attr.Style |= MWS_SFXCAPTION;
  36. }
  37.  
  38. LRESULT
  39. TSFXMDIFrame::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
  40. {
  41.     return SFXDefFrameProc(HWindow, ClientWnd ? ClientWnd->HWindow : 0, 
  42.                            message, wParam, lParam);
  43. }
  44.  
  45. IMPLEMENT_STREAMABLE3(TSFXMDIFrame, TMDIFrame, TFrameWindow, TWindow);
  46.  
  47. void*
  48. TSFXMDIFrame::Streamer::Read(ipstream& is, uint32 /*version*/) const
  49. {
  50.     ReadVirtualBase((TMDIFrame*)GetObject(), is);
  51.     return GetObject();
  52. }
  53.  
  54. void
  55. TSFXMDIFrame::Streamer::Write(opstream& os) const
  56. {
  57.     WriteVirtualBase((TMDIFrame*)GetObject(), os);
  58. }
  59.  
  60.