mainmenuview.cpp

来自「基于WindowCE上对于windows mobile开发的一个俄罗斯方块程序」· C++ 代码 · 共 81 行

CPP
81
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?