97 lines
2.1 KiB
C++
97 lines
2.1 KiB
C++
// MainFrm.cpp : implementation of the CMainFrame class
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "sp.h"
|
|
|
|
#include "MainFrm.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
//#define _CRTDBG_MAP_ALLOC
|
|
//#include <stdlib.h>
|
|
//#include <crtdbg.h>
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame
|
|
|
|
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
|
|
|
|
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
|
|
//{{AFX_MSG_MAP(CMainFrame)
|
|
ON_WM_CLOSE()
|
|
//}}AFX_MSG_MAP
|
|
// Global help commands
|
|
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()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame construction/destruction
|
|
|
|
CMainFrame::CMainFrame()
|
|
{
|
|
// TODO: add member initialization code here
|
|
m_bAutoMenuEnable = FALSE;
|
|
}
|
|
|
|
CMainFrame::~CMainFrame()
|
|
{
|
|
}
|
|
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
|
|
{
|
|
if( !CFrameWnd::PreCreateWindow(cs) )
|
|
return FALSE;
|
|
// TODO: Modify the Window class or styles here by modifying
|
|
// the CREATESTRUCT cs
|
|
|
|
cs.style = WS_OVERLAPPED | WS_CAPTION | FWS_ADDTOTITLE
|
|
| WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;// | WS_MAXIMIZE
|
|
|
|
cs.style &= ~FWS_ADDTOTITLE; // no title
|
|
|
|
/*
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
|
|
{
|
|
cs.style &= ~FWS_ADDTOTITLE; // no title
|
|
return CFrameWnd::PreCreateWindow(cs);
|
|
}
|
|
*/
|
|
return TRUE;
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CMainFrame::AssertValid() const
|
|
{
|
|
//CFrameWnd::AssertValid();
|
|
}
|
|
|
|
void CMainFrame::Dump(CDumpContext& dc) const
|
|
{
|
|
CFrameWnd::Dump(dc);
|
|
}
|
|
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame message handlers
|
|
|
|
|
|
void CMainFrame::OnClose()
|
|
{
|
|
m_pApp= (CSpApp*)AfxGetApp();
|
|
m_pApp->OnExit();
|
|
//CFrameWnd::OnClose();
|
|
}
|