📄 about.cpp
字号:
// About.cpp : implementation file
//
#include "stdafx.h"
#include "SkyRiver.h"
#include "About.h"
#include "Help.h"
#include "AboutGame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAbout dialog
CAbout::CAbout(CWnd* pParent /*=NULL*/)
: CDialog(CAbout::IDD, pParent)
{
//{{AFX_DATA_INIT(CAbout)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CAbout::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAbout)
DDX_Control(pDX, IDC_EDIT1, m_Edit);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAbout, CDialog)
//{{AFX_MSG_MAP(CAbout)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAbout message handlers
BOOL CAbout::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
SetButton(this,IDC_BUTTON1,3,IDI_ICON8 ,NULL,NULL,NULL,_T("www.77146.com"),TRUE);
SetButton(this,IDC_BUTTON2,3,IDI_ICON10,NULL,NULL,NULL,NULL,TRUE);
SetButton(this,IDC_BUTTON3,3,IDI_ICON1 ,NULL,NULL,NULL,NULL,TRUE);
SetButton(this,IDC_BUTTON4,3,IDI_ICON9 ,NULL,NULL,NULL,NULL,TRUE);
m_Edit.SetLimitText(1000);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CAbout::OnButton2()
{
// TODO: Add your control notification handler code here
EndDialog(IDCANCEL);
CAboutGame* gameDlg=new CAboutGame;
gameDlg->Create(CAboutGame::IDD,NULL);
gameDlg->ShowWindow(SW_SHOW);
}
void CAbout::OnButton3()
{
// TODO: Add your control notification handler code here
CString s;
s.Format(IDS_VERSION);
m_Edit.SetWindowText(s);
}
void CAbout::OnButton4()
{
// TODO: Add your control notification handler code here
CString s;
s.Format(IDS_OTHER);
m_Edit.SetWindowText(s);
}
void CAbout::AboutMe()
{
OnButton3();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -