CMainFrame Class Reference

#include <MainFrm.h>

List of all members.

Public Member Functions

virtual BOOL OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
virtual BOOL PreCreateWindow (CREATESTRUCT &cs)
virtual ~CMainFrame ()

Protected Member Functions

 CMainFrame ()
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)

Protected Attributes

CSplitterWnd m_wndSplitter
CStatusBar m_wndStatusBar
CToolBar m_wndToolBar


Detailed Description

Definition at line 12 of file MainFrm.h.


Constructor & Destructor Documentation

CMainFrame::CMainFrame (  )  [protected]

Definition at line 37 of file MainFrm.cpp.

00038 {
00039 
00040 }

CMainFrame::~CMainFrame (  )  [virtual]

Definition at line 42 of file MainFrm.cpp.

00043 {
00044 }


Member Function Documentation

BOOL CMainFrame::OnCreateClient ( LPCREATESTRUCT  lpcs,
CCreateContext *  pContext 
) [virtual]

Definition at line 76 of file MainFrm.cpp.

References m_wndSplitter.

00078 {
00079         return m_wndSplitter.Create(this,
00080                 2, 2,               // TODO: adjust the number of rows, columns
00081                 CSize(10, 10),      // TODO: adjust the minimum pane size
00082                 pContext);
00083 }

BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT &  cs  )  [virtual]

Definition at line 85 of file MainFrm.cpp.

00086 {
00087         if( !CFrameWnd::PreCreateWindow(cs) )
00088                 return FALSE;
00089         // TODO: Modify the Window class or styles here by modifying
00090         //  the CREATESTRUCT cs
00091 
00092         return TRUE;
00093 }

int CMainFrame::OnCreate ( LPCREATESTRUCT  lpCreateStruct  )  [protected]

Definition at line 46 of file MainFrm.cpp.

References IDR_MAINFRAME, indicators, m_wndStatusBar, and m_wndToolBar.

00047 {
00048         if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00049                 return -1;
00050         
00051         if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00052                 | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00053                 !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00054         {
00055                 TRACE0("Failed to create toolbar\n");
00056                 return -1;      // fail to create
00057         }
00058 
00059         if (!m_wndStatusBar.Create(this) ||
00060                 !m_wndStatusBar.SetIndicators(indicators,
00061                   sizeof(indicators)/sizeof(UINT)))
00062         {
00063                 TRACE0("Failed to create status bar\n");
00064                 return -1;      // fail to create
00065         }
00066 
00067         // TODO: Delete these three lines if you don't want the toolbar to
00068         //  be dockable
00069         m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00070         EnableDocking(CBRS_ALIGN_ANY);
00071         DockControlBar(&m_wndToolBar);
00072 
00073         return 0;
00074 }


Member Data Documentation

CSplitterWnd CMainFrame::m_wndSplitter [protected]

Definition at line 21 of file MainFrm.h.

Referenced by OnCreateClient().

CStatusBar CMainFrame::m_wndStatusBar [protected]

Definition at line 44 of file MainFrm.h.

Referenced by OnCreate().

CToolBar CMainFrame::m_wndToolBar [protected]

Definition at line 45 of file MainFrm.h.

Referenced by OnCreate().


The documentation for this class was generated from the following files:

Generated on Wed Aug 20 00:48:45 2008 for EvolveTraffic by  doxygen 1.5.6