CMFCAcceleratorKeyAssignCtrl Class

The CMFCAcceleratorKeyAssignCtrl class extends the CEdit Class to support extra system buttons such as ALT, CONTROL, and SHIFT.

class CMFCAcceleratorKeyAssignCtrl : public CEdit

Members

Public Constructors

Name

Description

CMFCAcceleratorKeyAssignCtrl::CMFCAcceleratorKeyAssignCtrl

Constructs a CMFCAcceleratorKeyAssignCtrl object.

Public Methods

Name

Description

CMFCAcceleratorKeyAssignCtrl::GetAccel

Retrieves the ACCEL structure for a shortcut key pressed in the CMFCAcceleratorKeyAssignCtrl object.

CMFCAcceleratorKeyAssignCtrl::IsFocused

 

CMFCAcceleratorKeyAssignCtrl::IsKeyDefined

Determines whether a shortcut key has been defined.

CMFCAcceleratorKeyAssignCtrl::PreTranslateMessage

Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.)

CMFCAcceleratorKeyAssignCtrl::ResetKey

Resets the shortcut key.

Remarks

This class extends the functionality of the CEdit class by supporting shortcut keys, also known as accelerator keys. The CMFCAcceleratorKeyAssignCtrl class functions as a CEdit Class and it can also recognize system buttons.

This class maps physical shortcut key combinations to string values. For example, assume the key combination ALT + B is mapped to the string "Alt + B". When the user presses this key combination in a CMFCAcceleratorKeyAssignCtrl object, "Alt + B" is displayed to the user. For more information about the mapping between shortcut keys and a string format, see CMFCAcceleratorKey Class.

Example

The following example demonstrates how to construct a CMFCAcceleratorKeyAssignCtrl object and use its ResetKey method to reset the shortcut key.

  CMFCAcceleratorKeyAssignCtrl* accelCtrl = new CMFCAcceleratorKeyAssignCtrl();
    accelCtrl->ResetKey();

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CEdit

            CMFCAcceleratorKeyAssignCtrl

Requirements

Header: afxacceleratorkeyassignctrl.h

See Also

Reference

Hierarchy Chart

CMFCAcceleratorKey Class

Other Resources

MFC Classes