📄 mainmenuview.cpp
字号:
// MainmenuView.cpp : 实现文件
//
#include "stdafx.h"
#include "OurBloke.h"
#include "MainmenuView.h"
#include "MainFrm.h"
#include "AboutDlg.h"
#define WM_CHANGEVIEW (WM_USER + 1)
// CMainmenuView
IMPLEMENT_DYNCREATE(CMainmenuView, CFormView)
CMainmenuView::CMainmenuView()
: CFormView(CMainmenuView::IDD)
{
}
CMainmenuView::~CMainmenuView()
{
}
void CMainmenuView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CMainmenuView, CFormView)
ON_BN_CLICKED(IDC_BUTTON1, &CMainmenuView::OnBnClickedButton1)
ON_BN_CLICKED(IDC_BUTTON4, &CMainmenuView::OnBnClickedButton4)
ON_BN_CLICKED(IDC_BUTTON2, &CMainmenuView::OnBnClickedButton2)
END_MESSAGE_MAP()
// CMainmenuView 诊断
#ifdef _DEBUG
void CMainmenuView::AssertValid() const
{
CFormView::AssertValid();
}
#ifndef _WIN32_WCE
void CMainmenuView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif
#endif //_DEBUG
// CMainmenuView 消息处理程序
void CMainmenuView::OnBnClickedButton1()
{
CMainFrame *pMain=(CMainFrame *)AfxGetApp()->m_pMainWnd;
pMain->SendMessage(WM_CHANGEVIEW,0,0);
// TODO: 在此添加控件通知处理程序代码
}
void CMainmenuView::OnBnClickedButton4()
{
// TODO: 在此添加控件通知处理程序代码
CAboutDlg about;
about.DoModal();
}
void CMainmenuView::OnBnClickedButton2()
{
// TODO: 在此添加控件通知处理程序代码
CMainFrame *pMain=(CMainFrame *)AfxGetApp()->m_pMainWnd;
pMain->DestroyWindow();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -