home *** CD-ROM | disk | FTP | other *** search
/ C/C++ User's Journal & Wi…eveloper's Journal Tools / C-C__Users_Journal_and_Windows_Developers_Journal_Tools_1997.iso / stingray / scrltmdi.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-27  |  2.4 KB  |  84 lines

  1. // This is a part of the Objective Grid C++ Library.
  2. // Copyright (C) 1995,1996 ClassWorks, Stefan Hoenig.
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to
  6. // the Objective Grid Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding
  9. // the Objective Grid product.
  10. //
  11.  
  12. // scrltmdi.cpp : implementation file
  13. //
  14.  
  15. #include "stdafx.h"
  16. #include "gridapp.h"
  17. #include "gridsdoc.h"
  18. #include "scrltmdi.h"
  19.  
  20. #include "gridsvw.h"
  21. #include "gridsvw2.h"
  22. #include "gridsvw3.h"
  23. #include "gridsvw4.h"
  24. #include "gridsvw5.h"
  25. #include "gridsvw6.h"
  26. #include "gridsvw7.h"
  27. #include "gridsvw8.h"
  28.  
  29. #ifdef _DEBUG
  30. #undef THIS_FILE
  31. static char BASED_CODE THIS_FILE[] = __FILE__;
  32. #endif
  33.  
  34. IMPLEMENT_DYNCREATE(CScrltabsMDIChildWnd, CMDIChildWnd)
  35.  
  36. #define new DEBUG_NEW
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CScrltabsMDIChildWnd
  40.  
  41. CScrltabsMDIChildWnd::CScrltabsMDIChildWnd()
  42. {
  43. }
  44.  
  45. CScrltabsMDIChildWnd::~CScrltabsMDIChildWnd()
  46. {
  47. }
  48.  
  49. BOOL CScrltabsMDIChildWnd::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
  50. {
  51.     CGridSampleApp* pApp = (CGridSampleApp*) AfxGetApp();
  52.  
  53.  
  54.     // specify the runtime class for the first sheet
  55.     // don't forget to register the document template in InitInstance!
  56.     pContext->m_pNewViewClass = RUNTIME_CLASS(CGridSample8View);
  57.  
  58.     // creates the tab window
  59.     VERIFY(m_wndTab.Create(this, _T("What's New?"), pContext));
  60.  
  61.     // each view should associated with the same document.
  62.  
  63.     // next sheets
  64.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSampleView), _T("Simple"), pContext);
  65.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSample2View), _T("Formats"), pContext);
  66.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSample3View), _T("Base Styles"), pContext);
  67.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSample4View), _T("Welcome"), pContext);
  68.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSample5View), _T("Controls"), pContext);
  69.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSample6View), _T("Grid Children"), pContext);
  70.     m_wndTab.CreateView(RUNTIME_CLASS(CGridSample7View), _T("Headers"), pContext);
  71.  
  72.     return TRUE;
  73. }
  74.  
  75. BEGIN_MESSAGE_MAP(CScrltabsMDIChildWnd, CMDIChildWnd)
  76.     //{{AFX_MSG_MAP(CScrltabsMDIChildWnd)
  77.     //}}AFX_MSG_MAP
  78. END_MESSAGE_MAP()
  79.  
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CScrltabsMDIChildWnd message handlers
  83.  
  84.