helpdlg.cpp

来自「该项目是为PPC(PocketPc)使用者提供方便的理财事务.如,现金的借贷,债」· C++ 代码 · 共 78 行

CPP
78
字号
// HelpDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MoneyAnyWhere.h"
#include "HelpDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CHelpDlg dialog


CHelpDlg::CHelpDlg(CWnd* pParent /*=NULL*/)
	: CSTHtmlDialog(CHelpDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CHelpDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CHelpDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CHelpDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


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

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

BOOL CHelpDlg::OnInitDialog() 
{
	CSTHtmlDialog::OnInitDialog();
	
	//Here we register image that will be accessible in HTML
	RegisterHtmlImage(IDB_HELPTEST, _T("test"));

	//Here we set HTML text that will be shown
	CString strHtml;
	strHtml.LoadString(IDS_HTMLINDEX);
	SetHtml(strHtml);

	
	CenterWindow(GetDesktopWindow());	// center to the hpc screen
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

//This method is called if a link is clicked
void CHelpDlg::OnLink(const CString &strHref)
{
	if (strHref==_T("account")) {
		CString strHtml;
		strHtml.LoadString(IDS_HTMLACCOUNT);
		SetHtml(strHtml);
	}
	if (strHref==_T("index")) 
	{	
		CString strHtml;
		strHtml.LoadString(IDS_HTMLINDEX);
		SetHtml(strHtml);
	}
}

⌨️ 快捷键说明

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