00001
00002
00003
00004 #include "stdafx.h"
00005 #include "EvolveTraffic.h"
00006
00007 #include "MainFrm.h"
00008
00009 #ifdef _DEBUG
00010 #define new DEBUG_NEW
00011 #undef THIS_FILE
00012 static char THIS_FILE[] = __FILE__;
00013 #endif
00014
00016
00017
00018 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00019
00020 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00021
00022 ON_WM_CREATE()
00023
00024 END_MESSAGE_MAP()
00025
00026 static UINT indicators[] =
00027 {
00028 ID_SEPARATOR,
00029 ID_INDICATOR_CAPS,
00030 ID_INDICATOR_NUM,
00031 ID_INDICATOR_SCRL,
00032 };
00033
00035
00036
00037 CMainFrame::CMainFrame()
00038 {
00039
00040 }
00041
00042 CMainFrame::~CMainFrame()
00043 {
00044 }
00045
00046 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
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;
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;
00065 }
00066
00067
00068
00069 m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00070 EnableDocking(CBRS_ALIGN_ANY);
00071 DockControlBar(&m_wndToolBar);
00072
00073 return 0;
00074 }
00075
00076 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT ,
00077 CCreateContext* pContext)
00078 {
00079 return m_wndSplitter.Create(this,
00080 2, 2,
00081 CSize(10, 10),
00082 pContext);
00083 }
00084
00085 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00086 {
00087 if( !CFrameWnd::PreCreateWindow(cs) )
00088 return FALSE;
00089
00090
00091
00092 return TRUE;
00093 }
00094
00096
00097
00098 #ifdef _DEBUG
00099 void CMainFrame::AssertValid() const
00100 {
00101 CFrameWnd::AssertValid();
00102 }
00103
00104 void CMainFrame::Dump(CDumpContext& dc) const
00105 {
00106 CFrameWnd::Dump(dc);
00107 }
00108
00109 #endif //_DEBUG
00110
00112
00113