home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / npp / mainfrm.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  69 lines

  1. // mainfrm.h : interface of the CMainFrame class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. //
  13.  
  14. class CMainFrame : public CFrameWnd
  15. {
  16. protected: // create from serialization only
  17.     CMainFrame();
  18.     DECLARE_DYNCREATE(CMainFrame)
  19.  
  20. // Attributes
  21. public:
  22.     CComboToolBar    m_wndToolBar;
  23.  
  24. // Operations
  25. public:
  26.  
  27. // Overrides
  28.     // ClassWizard generated virtual function overrides
  29.     //{{AFX_VIRTUAL(CMainFrame)
  30.     //}}AFX_VIRTUAL
  31.  
  32. // Implementation
  33. public:
  34.     virtual ~CMainFrame();
  35. #ifdef _DEBUG
  36.     virtual void AssertValid() const;
  37.     virtual void Dump(CDumpContext& dc) const;
  38. #endif
  39.  
  40. protected:  // control bar embedded members
  41.     CStatusBar  m_wndStatusBar;
  42.     BOOL CreateComboBox();
  43.  
  44. // Generated message map functions
  45. protected:
  46.     //{{AFX_MSG(CMainFrame)
  47.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  48.     afx_msg void OnClose();
  49.     afx_msg void OnViewStatusBar();
  50.     afx_msg void OnEditFindCombo();
  51.     //}}AFX_MSG
  52.     afx_msg void OnUpdateViewStatusBar(CCmdUI* pCmdUI);
  53.     afx_msg void OnUpdateLineNumber(CCmdUI* pCmdUI);
  54.     afx_msg void OnUpdateClock(CCmdUI* pCmdUI);
  55.  
  56.     // timer call back function
  57.     static void CALLBACK EXPORT UpdateTime(HWND hWnd,UINT nMsg, UINT nIDEvent, DWORD dwTime);
  58.     DECLARE_MESSAGE_MAP()
  59. };
  60.  
  61. inline CNotepadView* GetApplicationView()
  62. {
  63.     CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();
  64.     ASSERT(pFrame);
  65.     return (CNotepadView*)(pFrame)->GetActiveView();
  66. }
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69.