www.pudn.com > 智能内码识别,支持屏幕取词翻译的程序.zip > HOTKEY.H


// hotkey.h : header file 
// 
 
#define	MAX_HOT_KEY	10		//最多热键数 
struct	HOT_KEY_PARAM	//热键参数结构 
{ 
	char	sName[100] ;	//热键名称,即其功能 
	//热键值 
	BOOL	bCtrl ; 
	BOOL	bShift ; 
	BOOL	bAlt ; 
	int			 nChar ; 
	//热键缺省值 
	BOOL	bDefaultCtrl ; 
	BOOL	bDefaultShift ; 
	BOOL	bDefaultAlt ; 
	int			 nDefaultChar ; 
} ; 
	 
///////////////////////////////////////////////////////////////////////////// 
// CHotKey dialog 
 
class CHotKey : public CCommonPage 
{ 
// Construction 
public: 
	CHotKey(UINT id);	// standard constructor 
 
// Dialog Data 
	//{{AFX_DATA(CHotKey) 
	enum { IDD = IDD_DIALOG3 }; 
	CComboBox	m_Char; 
	CListBox	m_HotKeyName; 
	BOOL	m_bCtrl; 
	BOOL	m_bAlt; 
	BOOL	m_bShift; 
	//}}AFX_DATA 
 
// Implementation 
protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
 
	// Generated message map functions 
	//{{AFX_MSG(CHotKey) 
	virtual void OnOK(); 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnSetCurrentDefault(); 
	afx_msg void OnSetAllDefault(); 
	afx_msg void OnChangeHotKey(); 
	afx_msg void OnSelectChar(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
 
	private: 
		int		m_nHotKeyNum ;	//热键数目 
		int		m_nCurrentHotKey ;	//当前激活的热键 
	public: 
		//热键参数 
		HOT_KEY_PARAM	m_HotKeyParam[MAX_HOT_KEY] ; 
	private: 
		//设置当前热键值 
		void	SetCurrentHotKeyParam( void ) ; 
		//设置为缺省值 
		void	SetDefaultParam( int n ) ; 
} ;