有一个CHotkeyCtrl控件用来定义热键,定义好的热键需要在一个菜单的item text的右边显示出来,怎么取出CHotkeyCtrl控件上显示的文本?
我试了GetWindowText取不出来。
GetHotKey
CString s;
WORD wVirtualKeyCode, wModifiers ;
m_aa.GetHotKey( wVirtualKeyCode, wModifiers );
s.Format("%d-%d", wVirtualKeyCode, wModifiers );
AfxMessageBox(s);
‘A’==65
#define HOTKEYF_SHIFT 0x01
#define HOTKEYF_CONTROL 0x02
#define HOTKEYF_ALT 0x04
// Retrieves a string representation of the hot key code and flags.
CString CHotKeyCtrl::GetHotKeyName() const;
// Retrieves a string representation of the virtual key.
static CString CHotKeyCtrl::GetKeyName(_In_ UINT vk, _In_ BOOL fExtended);