home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual C++ 4 (2nd Edition) / VisualC4.ISO / servdemo / ipframe.cpp next >
Encoding:
C/C++ Source or Header  |  1995-09-30  |  1.9 KB  |  82 lines

  1. // IpFrame.cpp : implementation of the CInPlaceFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "ServDemo.h"
  6.  
  7. #include "IpFrame.h"
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CInPlaceFrame
  17.  
  18. IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWnd)
  19.  
  20. BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWnd)
  21.    //{{AFX_MSG_MAP(CInPlaceFrame)
  22.    ON_WM_CREATE()
  23.    //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CInPlaceFrame construction/destruction
  28.  
  29. CInPlaceFrame::CInPlaceFrame()
  30. {
  31. }
  32.  
  33. CInPlaceFrame::~CInPlaceFrame()
  34. {
  35. }
  36.  
  37. int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  38. {
  39.    if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1)
  40.       return -1;
  41.  
  42.    // CResizeBar implements in-place resizing.
  43.    if (!m_wndResizeBar.Create(this))
  44.    {
  45.       TRACE0("Failed to create resize bar\n");
  46.       return -1;      // fail to create
  47.    }
  48.  
  49.    // By default, it is a good idea to register a drop-target that does
  50.    //  nothing with your frame window.  This prevents drops from
  51.    //  "falling through" to a container that supports drag-drop.
  52.    m_dropTarget.Register(this);
  53.  
  54.    return 0;
  55. }
  56.  
  57. BOOL CInPlaceFrame::PreCreateWindow(CREATESTRUCT& cs)
  58. {
  59.    // TODO: Modify the Window class or styles here by modifying
  60.    //  the CREATESTRUCT cs
  61.  
  62.    return COleIPFrameWnd::PreCreateWindow(cs);
  63. }
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66. // CInPlaceFrame diagnostics
  67.  
  68. #ifdef _DEBUG
  69. void CInPlaceFrame::AssertValid() const
  70. {
  71.    COleIPFrameWnd::AssertValid();
  72. }
  73.  
  74. void CInPlaceFrame::Dump(CDumpContext& dc) const
  75. {
  76.    COleIPFrameWnd::Dump(dc);
  77. }
  78. #endif //_DEBUG
  79.  
  80. /////////////////////////////////////////////////////////////////////////////
  81. // CInPlaceFrame commands
  82.