ChildSplitFrame.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // ChildSplitFrame.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "demo.h"
  5. #include "ChildSplitFrame.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CChildSplitFrame
  13. IMPLEMENT_DYNCREATE(CChildSplitFrame, CResizableMDIChild)
  14. CChildSplitFrame::CChildSplitFrame()
  15. {
  16. }
  17. CChildSplitFrame::~CChildSplitFrame()
  18. {
  19. }
  20. BEGIN_MESSAGE_MAP(CChildSplitFrame, CResizableMDIChild)
  21. //{{AFX_MSG_MAP(CChildSplitFrame)
  22. // NOTE - the ClassWizard will add and remove mapping macros here.
  23. //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CChildSplitFrame message handlers
  27. BOOL CChildSplitFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
  28. {
  29. // CG: The following block was added by the Splitter Bar component.
  30. {
  31. if (!m_wndSplitter.Create(this,
  32. 2, 2, // TODO: adjust the number of rows, columns
  33. CSize(10, 10), // TODO: adjust the minimum pane size
  34. pContext))
  35. {
  36. TRACE0("Failed to create splitter bar ");
  37. return FALSE; // failed to create
  38. }
  39. return TRUE;
  40. }
  41. }
  42. void CChildSplitFrame::ActivateFrame(int nCmdShow)
  43. {
  44. if ( EnableSaveRestore(_T("Demo MDI SplitFrame")) )
  45. {
  46. // if correctly restored, activate window and return
  47. MDIActivate();
  48. return;
  49. }
  50. CResizableMDIChild::ActivateFrame(nCmdShow);
  51. }