Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
A helper class that implements virtual key mapping and formatting.
class CMFCAcceleratorKey : public CObject
Members
Public Constructors
Name |
Description |
|---|---|
Constructs a CMFCAcceleratorKey object. |
Public Methods
Name |
Description |
|---|---|
Translates the ACCEL structure to its visual representation. |
|
Sets the shortcut key for the CMFCAcceleratorKey object. |
Remarks
Accelerator keys are also known as shortcut keys. If you want to display keyboard shortcuts that a user enters, the CMFCAcceleratorKeyAssignCtrl Class maps keyboard shortcuts, such as Alt+Shift+S, to a custom text format, such as "Alt + Shift + S". Each CMFCAcceleratorKey object maps a single shortcut key to a text format.
For more information about how to use shortcut keys and accelerator tables, seeCKeyboardManager Class.
Example
The following example demonstrates how to construct a CMFCAcceleratorKey object and how to use its Format method.
CString strKey;
ACCEL accel;
accel.fVirt = FVIRTKEY | FCONTROL;
accel.key = VK_DOWN;
CMFCAcceleratorKey helper(&accel);
helper.Format(strKey);
Inheritance Hierarchy
Requirements
Header: afxacceleratorkey.h