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

📄 helpdlg.cpp

📁 通讯录管理系统1.0 可以为您方便地, 安全地管理你的通讯录, 是您的家庭好帮手. 本系统使用Visual C++(MFC)开发, ODBC开放式数据库源
💻 CPP
字号:
// HelpDlg.cpp : implementation file
//

#include "stdafx.h"
#include "SGAdrLstMS.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*/)
	: CDialog(CHelpDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CHelpDlg)
	m_hlptxt = _T("");
	//}}AFX_DATA_INIT
}


void CHelpDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CHelpDlg)
	DDX_Text(pDX, IDC_HLPTXT, m_hlptxt);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CHelpDlg, CDialog)
	//{{AFX_MSG_MAP(CHelpDlg)
	ON_BN_CLICKED(IDC_SHOUTDOWN, OnShoutdown)
	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

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

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

	char cs[256];
	
	//GetModuleFileName(NULL,cs,256);
	::GetCurrentDirectory(256,cs);

	
	
	strcat(cs,"\\SGAdrLstMSHlp.txt");

	CFile hlp;
	if (!hlp.Open(cs,0))
	{
		MessageBox("找不到帮助主题文件","错误",MB_ICONSTOP);
		return FALSE;
	}
	

	char  txt[10000]="";
	
	hlp.Read(txt,hlp.GetLength());
	this->UpdateData(true);
	this->m_hlptxt = txt;
	this->UpdateData(false);

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

void CHelpDlg::OnShoutdown() 
{

	
	this->OnOK();
}

void CHelpDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
    this->GetDlgItem(IDC_SHOUTDOWN)->SetFocus();	
}

⌨️ 快捷键说明

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