📄 gamelogin.cpp
字号:
// GAMELOGIN.cpp : implementation file
//
#include "stdafx.h"
#include "Game.h"
#include "GAMELOGIN.h"
#include "GameSRDZ.h"
#include "GameButton.h"
#include "GameMapMake.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGAMELOGIN dialog
CGAMELOGIN::CGAMELOGIN(CWnd* pParent /*=NULL*/)
: CDialog(CGAMELOGIN::IDD, pParent)
{
//{{AFX_DATA_INIT(CGAMELOGIN)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_dryx.m_Model = 1;
m_srdz.m_Model = 2;
m_yxjs.m_Model = 3;
m_tcyx.m_Model = 4;
m_bkBitmap.LoadBitmap(IDB_DLJM);
}
void CGAMELOGIN::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGAMELOGIN)
DDX_Control(pDX, IDC_YXJS, m_yxjs);
DDX_Control(pDX, IDC_TCYX, m_tcyx);
DDX_Control(pDX, IDC_SRDZ, m_srdz);
DDX_Control(pDX, IDC_DRYX, m_dryx);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGAMELOGIN, CDialog)
//{{AFX_MSG_MAP(CGAMELOGIN)
ON_BN_CLICKED(IDC_TCYX, OnTcyx)
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_DRYX, OnDryx)
ON_WM_ERASEBKGND()
ON_BN_CLICKED(IDC_SRDZ, OnSrdz)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGAMELOGIN message handlers
BOOL CGAMELOGIN::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
SetWindowPos(&wndTopMost,0,0,300,230,SWP_NOMOVE);
ModifyStyleEx(WS_EX_APPWINDOW,0,0);
CenterWindow();
Createmaze();
return TRUE; // return TRUE unless you set the focus to a control
}
BOOL CGAMELOGIN::OnEraseBkgnd(CDC* pDC)
{
CRect rect;
GetWindowRect(&rect);
CDC dc;
dc.CreateCompatibleDC(pDC);
dc.SelectObject(&m_bkBitmap);
pDC->BitBlt(0,0,rect.Width(),rect.Height(),&dc,0,0,SRCCOPY);
return TRUE;
}
void CGAMELOGIN::OnClose()
{
exit(0);
CDialog::OnClose();
}
void CGAMELOGIN::OnTcyx()
{
MessageBox("谢谢使用,再见!");
exit(0);
}
void CGAMELOGIN::OnDryx()
{
GameClass=1;
CDialog::EndDialog(1);
}
void CGAMELOGIN::OnSrdz()
{
GameClass=2;
CDialog::EndDialog(1);
CGameSRDZ srdlg;
srdlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -