home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 21 / IOPROG_21.ISO / SOFT / DEMOT.ZIP / Src / demo_toolbar / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-23  |  2.8 KB  |  106 lines

  1. // MainFrm.h : interface of the CMainFrame class
  2. //
  3. // 1998 Kirk Stowell ( kstowel@sprynet.com )
  4. // www.geocities.com/SiliconValley/Haven/8230/index.html
  5. //
  6. // You are free to use, modify and distribute this source, as long as
  7. // there is no charge, and this HEADER stays intact. This source is
  8. // supplied "AS-IS", and without WARRANTY OF ANY KIND, and the user
  9. // holds the author blameless for any or all problems that may arise
  10. // from the use of this code.
  11. //
  12. //////////////////////////////////////////////////////////////////////
  13.  
  14. #if !defined(AFX_MAINFRM_H__6F831B29_0710_11D2_AB9F_441100C10000__INCLUDED_)
  15. #define AFX_MAINFRM_H__6F831B29_0710_11D2_AB9F_441100C10000__INCLUDED_
  16.  
  17. #if _MSC_VER >= 1000
  18. #pragma once
  19. #endif // _MSC_VER >= 1000
  20.  
  21. class CMainFrame : public CMDIFrameWnd
  22. {
  23.     DECLARE_DYNAMIC(CMainFrame)
  24. public:
  25.     CMainFrame();
  26.  
  27. // Attributes
  28. public:
  29.  
  30. // Operations
  31. public:
  32.  
  33.     // Note: to use any of these methods from another
  34.     // class cast m_pMainWnd to a CMainFrame pointer, then
  35.     // call the method ie: ((CMainFrame*)m_pMainWnd)->GetEditControl()...
  36.  
  37.     // return a reference to the edit control
  38.     CEdit& GetEditControl() {
  39.         return *m_edit;
  40.     }
  41.  
  42.     // return a reference to the combo control
  43.     CComboBox& GetComboControl() {
  44.         return *m_combo;
  45.     }
  46.  
  47.     // get the currently selected combo index
  48.     int GetComboIndex() {
  49.         return m_cbIndex;
  50.     }
  51.  
  52.     // set the combo index
  53.     void SetComboIndex( int nIndex ) {
  54.         m_cbIndex = nIndex;
  55.     }
  56.  
  57.     void DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf );
  58.  
  59. // Overrides
  60.     // ClassWizard generated virtual function overrides
  61.     //{{AFX_VIRTUAL(CMainFrame)
  62.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  63.     //}}AFX_VIRTUAL
  64.  
  65. // Implementation
  66. public:
  67.     virtual ~CMainFrame();
  68. #ifdef _DEBUG
  69.     virtual void AssertValid() const;
  70.     virtual void Dump(CDumpContext& dc) const;
  71. #endif
  72.  
  73. protected:  // control bar embedded members
  74.     CStatusBar  m_wndStatusBar;
  75.     CToolBar    m_wndToolBar;
  76.     CToolBar    m_winToolBar;
  77.     CToolBar    m_hotToolBar;
  78.     CImageList  m_pImageColor;
  79.     CImageList  m_pImageNoColor;
  80.     CEdit*        m_edit;
  81.     CComboBox*  m_combo;
  82.     int         m_cbIndex;
  83.     CMenuMgr    m_menuManager;
  84.  
  85. // Generated message map functions
  86. protected:
  87.     //{{AFX_MSG(CMainFrame)
  88.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  89.     afx_msg void OnBack();
  90.     afx_msg void OnForward();
  91.     afx_msg void OnStop();
  92.     afx_msg void OnRefresh();
  93.     afx_msg void OnHome();
  94.     afx_msg void OnSelEndOk();
  95.     afx_msg void OnToolbarDropDown(NMTOOLBAR* pnmh, LRESULT* plRes);
  96.     //}}AFX_MSG
  97.     DECLARE_MESSAGE_MAP()
  98. };
  99.  
  100. /////////////////////////////////////////////////////////////////////////////
  101.  
  102. //{{AFX_INSERT_LOCATION}}
  103. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  104.  
  105. #endif // !defined(AFX_MAINFRM_H__6F831B29_0710_11D2_AB9F_441100C10000__INCLUDED_)
  106.