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

📄 setkey.cpp

📁 The project demonstrates many Windows common controls, including the extensive use of image lists. T
💻 CPP
字号:
// setkey.cpp : implementation file
//

#include "stdafx.h"
#include "DooDads.h"
#include "setkey.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSetHotKey dialog


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


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

	CHotKeyCtrl* pCtrl;
	pCtrl = (CHotKeyCtrl*) GetDlgItem(IDC_HOTKEY);
	if (pDX->m_bSaveAndValidate)
	{	
		pCtrl->GetHotKey(m_wVirtKeyCode, m_wModifiers);
	
		TCHAR szName[50];
		pCtrl->GetWindowText(szName, 50);
		TRACE3("Key is \"%s\" (%4.4X, %4.4X)\n", (LPTSTR) szName,
			m_wVirtKeyCode, m_wModifiers);
	}
	else
		pCtrl->SetHotKey(m_wVirtKeyCode, m_wModifiers);
}


BEGIN_MESSAGE_MAP(CSetHotKey, CDialog)
	//{{AFX_MSG_MAP(CSetHotKey)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CSetHotKey message handlers

⌨️ 快捷键说明

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