?? mainfrm.cpp
字號:
// MainFrm.cpp : implementation file//#include "stdafx.h"#include "resource.h"#include "MainFrm.h"#include "hoopstestView.h"#include "HhoopstestView.h"#include "HhoopstestModel.h"#include ".\mainfrm.h"
#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endifstatic UINT indicators[] ={ ID_SEPARATOR, // status line indicator ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL,};/////////////////////////////////////////////////////////////////////////////// CMainFrameIMPLEMENT_DYNCREATE(CMainFrame, CHoopsFrame)CMainFrame::CMainFrame(){}CMainFrame::~CMainFrame(){}BEGIN_MESSAGE_MAP(CMainFrame, CHoopsFrame) //{{AFX_MSG_MAP(CMainFrame) ON_WM_CREATE() //}}AFX_MSG_MAP ON_WM_CLOSE()
END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CMainFrame message handlersint CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CHoopsFrame::OnCreate(lpCreateStruct) == -1) return -1; if (!m_toolbar_danbai.Create(this) || !m_toolbar_danbai.LoadToolBar(IDR_DANBAI)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } if (!m_toolbar_tanhuang.Create(this) || !m_toolbar_tanhuang.LoadToolBar(IDR_TANHUANG)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } // TODO: Delete these three lines if you don't want the toolbar to // be dockable m_toolbar_danbai.EnableDocking(CBRS_ALIGN_ANY); m_toolbar_tanhuang.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_toolbar_danbai,AFX_IDW_DOCKBAR_LEFT); DockControlBar(&m_toolbar_tanhuang,AFX_IDW_DOCKBAR_LEFT); m_toolbar_danbai.ShowWindow(SW_HIDE); m_toolbar_tanhuang.ShowWindow(SW_HIDE); return 0;}
void CMainFrame::OnClose()
{
int leave = MessageBox("確定退出么?","虛擬實(shí)驗室系統(tǒng)",MB_OKCANCEL);
if (leave == IDOK)
{
CHoopsFrame::OnClose();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -