/*=========================================================================== * * File: Mainfrm.CPP * Author: Dave Humphrey (uesp@m0use.net) * Created On: Saturday, June 23, 2001 * * Implements the CMainFrame class. * *=========================================================================*/ /* Include Files */ #include "stdafx.h" #include "dfto3ds.h" #include "MainFrm.h" /*=========================================================================== * * Begin Local Variable Definitions * *=========================================================================*/ #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif /* Status line indicators */ static UINT indicators[] = { ID_SEPARATOR, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL, }; IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) /*=========================================================================== * End of Local Variable Definitions *=========================================================================*/ /*=========================================================================== * * Begin CMainFrame Message Map * *=========================================================================*/ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) //{{AFX_MSG_MAP(CMainFrame) ON_WM_CREATE() //}}AFX_MSG_MAP ON_COMMAND(ID_HELP_CONTENTS,CFrameWnd::OnHelpFinder) ON_COMMAND(ID_HELP_INDEX,CFrameWnd::OnHelpIndex) ON_COMMAND(ID_HELP_FINDER, CFrameWnd::OnHelpFinder) ON_COMMAND(ID_HELP, CFrameWnd::OnHelp) ON_COMMAND(ID_CONTEXT_HELP, CFrameWnd::OnContextHelp) ON_COMMAND(ID_DEFAULT_HELP, CFrameWnd::OnHelpFinder) END_MESSAGE_MAP() /*=========================================================================== * End of CMainFrame Message Map *=========================================================================*/ /*=========================================================================== * * Class CMainFrame Constructor * *=========================================================================*/ CMainFrame::CMainFrame() { } /*=========================================================================== * End of Class CMainFrame Constructor *=========================================================================*/ /*=========================================================================== * * Class CMainFrame Destructor * *=========================================================================*/ CMainFrame::~CMainFrame() { } /*=========================================================================== * End of Class CMainFrame Destructor *=========================================================================*/ /*=========================================================================== * * Class CMainFrame Event - int OnCreate (lpCreateStruct); * *=========================================================================*/ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); return -1; } if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; } m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar); return 0; } /*=========================================================================== * End of Class Event CMainFrame::OnCreate() *=========================================================================*/ /*=========================================================================== * * Class CMainFrame Method - BOOL PreCreateWindow (cs); * *=========================================================================*/ BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { //cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER | WS_MINIMIZEBOX | DS_CONTEXTHELP; //cs.dwExStyle |= WS_EX_CONTEXTHELP; if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; return TRUE; } /*=========================================================================== * End of Class Method CMainFrame::PreCreateWindow() *=========================================================================*/ /*=========================================================================== * * Begin Class CMainFrame Diagnostics * *=========================================================================*/ #ifdef _DEBUG void CMainFrame::AssertValid() const { CFrameWnd::AssertValid(); } void CMainFrame::Dump(CDumpContext& dc) const { CFrameWnd::Dump(dc); } #endif /*=========================================================================== * End of CMainFrame Diagnostics *=========================================================================*/