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

📄 helpdlg.cpp

📁 LibraryManageDM.rar 数据库设计图书馆管理系统
💻 CPP
字号:
// HelpDlg.cpp : implementation file
//

#include "stdafx.h"
#include "librarymanage.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)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	items[0].strFunc = _T("用户管理");
	items[0].strShortcut = _T("Ctrl+U");
	items[1].strFunc = _T("注销用户");
	items[1].strShortcut = _T("Ctrl+O");
	items[2].strFunc = _T("退出系统");
	items[2].strShortcut = _T("Alt+X");
	items[3].strFunc = _T("图书设置");
	items[3].strShortcut = _T("Ctrl+B");
	items[4].strFunc = _T("读者设置");
	items[4].strShortcut = _T("Ctrl+R");
	items[5].strFunc = _T("罚款设置");
	items[5].strShortcut = _T("Ctrl+P");
	items[6].strFunc = _T("新书入库");
	items[6].strShortcut = _T("Ctrl+N");
	items[7].strFunc = _T("修改图书信息");
	items[7].strShortcut = _T("Ctrl+M");
	items[8].strFunc = _T("图书遗失处理");
	items[8].strShortcut = _T("Ctrl+L");
	items[9].strFunc = _T("读者注册");
	items[9].strShortcut = _T("Alt+N");
	items[10].strFunc = _T("读者修改");
	items[10].strShortcut = _T("Alt+M");
	items[11].strFunc = _T("读者注销");
	items[11].strShortcut = _T("Alt+L");
	items[12].strFunc = _T("帮助主题");
	items[12].strShortcut = _T("F1");
	items[13].strFunc = _T("图书信息查询");
	items[13].strShortcut = _T("F2");
	items[14].strFunc = _T("读者信息查询");
	items[14].strShortcut = _T("F3");
	items[15].strFunc = _T("借阅信息查询");
	items[15].strShortcut = _T("F4");
	items[16].strFunc = _T("借阅图书");
	items[16].strShortcut = _T("F5");
	items[17].strFunc = _T("续借图书");
	items[17].strShortcut = _T("F6");
	items[18].strFunc = _T("归还图书");
	items[18].strShortcut = _T("F7");
	items[19].strFunc = _T("缴纳罚款");
	items[19].strShortcut = _T("F8");
	items[20].strFunc = _T("数据库初始化");
	items[20].strShortcut = _T("F9");
	items[21].strFunc = _T("数据库备份");
	items[21].strShortcut = _T("F10");
	items[22].strFunc = _T("数据库还原");
	items[22].strShortcut = _T("F11");
	items[23].strFunc = _T("系统相关介绍");
	items[23].strShortcut = _T("F12");
}


void CHelpDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CHelpDlg)
	DDX_Control(pDX, IDC_LIST_SHORTCUT, m_ctrlShortcutList);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CHelpDlg, CDialog)
	//{{AFX_MSG_MAP(CHelpDlg)
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

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

BOOL CHelpDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CRect rect;
    m_ctrlShortcutList.GetClientRect(&rect);
    int width = rect.Width()/2 - 10;
	m_ctrlShortcutList.InsertColumn(0, _T("系统功能"), LVCFMT_LEFT, width);
    m_ctrlShortcutList.InsertColumn(1, _T("快捷键"), LVCFMT_LEFT, width);
    m_ctrlShortcutList.SetExtendedStyle(m_ctrlShortcutList.GetExtendedStyle() | \
        LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);

	for (int i = 0; i<COUNT; ++i)
	{
		m_ctrlShortcutList.InsertItem(i, items[i].strFunc);
		m_ctrlShortcutList.SetItemText(i, 1, items[i].strShortcut);
	}
	m_ctrlShortcutList.SetFocus();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CHelpDlg::OnDestroy() 
{
	CDialog::OnDestroy();
	
	// TODO: Add your message handler code here
	delete  this;
}

void CHelpDlg::OnOK() 
{
	// TODO: Add extra validation here
	
	CDialog::OnOK();
	DestroyWindow();
}

⌨️ 快捷键说明

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