⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helpdlg.cpp

📁 经典的俄罗斯方块游戏的在VC++中的实现
💻 CPP
字号:
/////////////////////////////////////////////////////////////////////////////
// This file is part of the completely free tetris clone "CGTetris".
//
// This is free software.
// You may redistribute it by any means providing it is not sold for profit
// without the authors written consent.
//
// No warrantee of any kind, expressed or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
/////////////////////////////////////////////////////////////////////////////


// HelpDlg.cpp : implementation file
//

#include "stdafx.h"
#include "tetris.h"
#include "HelpDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CHelpDlg property page

IMPLEMENT_DYNCREATE(CHelpDlg, CBitmapPropPage)

CHelpDlg::CHelpDlg() : CBitmapPropPage(CHelpDlg::IDD, IDS_HelpPageDlg)
{
	//{{AFX_DATA_INIT(CHelpDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_psp.dwFlags &= ~PSP_HASHELP;
}

CHelpDlg::~CHelpDlg()
{
}

void CHelpDlg::DoDataExchange(CDataExchange* pDX)
{
	CBitmapPropPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CHelpDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
	if( ! pDX->m_bSaveAndValidate )
		m_Help.SetCredits(m_strHelp, '|');
}


void CHelpDlg::LoadAllStrings() {
	CString strPrelude;
	VERIFY(CLanguage::LoadString(strPrelude, IDS_HelpPrelude));
	CString strKeys;
	VERIFY(CLanguage::LoadString(strKeys, IDS_HelpKeys));
	VERIFY(CLanguage::LoadString(m_strHelp, AFX_IDS_APP_TITLE));

	m_strHelp	 +=TEXT("\t|")
				 + strPrelude
				 + TEXT("KEYBOARD^||")
				 + strKeys
				 + TEXT("PARAGRAPH^|||||||||||||||||||||||")
				 ;
}


BEGIN_MESSAGE_MAP(CHelpDlg, CBitmapPropPage)
	//{{AFX_MSG_MAP(CHelpDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CHelpDlg message handlers

BOOL CHelpDlg::OnInitDialog() 
{
	CBitmapPropPage::OnInitDialog();

	LoadAllStrings();

	m_Help.SubclassDlgItem(IDC_Help, this);
	m_Help.SetSpeed(DISPLAY_MEDIUM);
	m_Help.SetTransparent();
	m_Help.SetBkImage(IDB_Background);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CHelpDlg::OnSetActive() 
{
	UpdateData(FALSE);
	m_Help.StartScrolling();
	return CBitmapPropPage::OnSetActive();
}

BOOL CHelpDlg::OnKillActive() 
{
	m_Help.EndScrolling();
	return CBitmapPropPage::OnKillActive();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -