home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / mainfrm.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-16  |  1.9 KB  |  85 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MyCalc.h"
  6.  
  7. #include "mainfrm.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CMainFrame
  16.  
  17. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  18.  
  19. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  20.     //{{AFX_MSG_MAP(CMainFrame)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code !
  23.     ON_WM_CREATE()
  24.     //}}AFX_MSG_MAP
  25. END_MESSAGE_MAP()
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // arrays of IDs used to initialize control bars
  29.  
  30. static UINT BASED_CODE indicators[] =
  31. {
  32.     ID_SEPARATOR,           // status line indicator
  33.     ID_INDICATOR_CAPS,
  34.     ID_INDICATOR_NUM,
  35.     ID_INDICATOR_SCRL,
  36. };
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CMainFrame construction/destruction
  40.  
  41. CMainFrame::CMainFrame()
  42. {
  43.     // TODO: add member initialization code here
  44.     
  45. }
  46.  
  47. CMainFrame::~CMainFrame()
  48. {
  49. }
  50.  
  51. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  52. {
  53.     if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
  54.         return -1;
  55.  
  56.     if (!m_wndStatusBar.Create(this) ||
  57.         !m_wndStatusBar.SetIndicators(indicators,
  58.           sizeof(indicators)/sizeof(UINT)))
  59.     {
  60.         TRACE0("Failed to create status bar\n");
  61.         return -1;      // fail to create
  62.     }
  63.  
  64.     return 0;
  65. }
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68. // CMainFrame diagnostics
  69.  
  70. #ifdef _DEBUG
  71. void CMainFrame::AssertValid() const
  72. {
  73.     CFrameWnd::AssertValid();
  74. }
  75.  
  76. void CMainFrame::Dump(CDumpContext& dc) const
  77. {
  78.     CFrameWnd::Dump(dc);
  79. }
  80.  
  81. #endif //_DEBUG
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84. // CMainFrame message handlers
  85.