core/vgui/impl/mfc/vgui_mfc_mainfrm.h
Go to the documentation of this file.
00001 // This is core/vgui/impl/mfc/vgui_mfc_mainfrm.h
00002 #ifndef AFX_VGUI_MFC_MAINFRM_H__B3175B74_0F91_44DD_8EFD_41CEA35852A1__INCLUDED_
00003 #define AFX_VGUI_MFC_MAINFRM_H__B3175B74_0F91_44DD_8EFD_41CEA35852A1__INCLUDED_
00004 //:
00005 // \file
00006 // \brief   Defines main window of the application
00007 // \author  Marko Bacic, Oxford RRG
00008 // \date    27 July 2000
00009 //
00010 // \verbatim
00011 //  Modifications
00012 //   22-AUG-2000 - Marko Bacic, Oxford RRG -- Added support for horizontal and
00013 //                                            vertical scroll bars
00014 // \endverbatim
00015 
00016 #if _MSC_VER > 1000
00017 #pragma once
00018 #endif // _MSC_VER > 1000
00019 #include "StdAfx.h"
00020 
00021 class vgui_mfc_statusbar;
00022 
00023 //: Defines main window of the application.
00024 class vgui_mfc_mainfrm : public CFrameWnd
00025 {
00026  protected:
00027   vgui_mfc_statusbar *statusbar;
00028 
00029  protected: // create from serialization only
00030   vgui_mfc_mainfrm();
00031   DECLARE_DYNCREATE(vgui_mfc_mainfrm)
00032  public:
00033   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00034   virtual void process_menus(UINT nID);
00035  public:
00036   virtual ~vgui_mfc_mainfrm();
00037   virtual void SetStatusBar(vgui_mfc_statusbar *sb) {statusbar = sb;}
00038   virtual void UpdateStatusBar(CCmdUI *sb) {OnUpdateStatusBar(sb);}
00039 #ifdef _DEBUG
00040   virtual void AssertValid() const;
00041   virtual void Dump(CDumpContext& dc) const;
00042 #endif
00043 
00044 // Generated message map functions
00045  protected:
00046   // Manually added by awf
00047   afx_msg void OnClose();
00048   // Manually added by kym
00049   BOOL PreTranslateMessage(MSG* pMsg);
00050 
00051   //: Called when the window is created
00052   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00053   //: Called when a vertical scroll bar sends a signal
00054   afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar );
00055   //: Called when a horizontal scroll bar sends a signal
00056   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar );
00057   //: Updates status bar
00058   afx_msg void OnUpdateStatusBar(CCmdUI *sbar);
00059   //: Called when specified timer has expired
00060   afx_msg void OnTimer(UINT_PTR);
00061 
00062   DECLARE_MESSAGE_MAP()
00063 };
00064 
00065 #endif // AFX_VGUI_MFC_MAINFRM_H__B3175B74_0F91_44DD_8EFD_41CEA35852A1__INCLUDED_