다음을 통해 공유


CMFCKeyMapDialog Class

The CMFCKeyMapDialog class supports a control that maps commands to keys on the keyboard.

class CMFCKeyMapDialog : public CDialogEx

Members

Public Constructors

Name

Description

CMFCKeyMapDialog::CMFCKeyMapDialog

Constructs a CMFCKeyMapDialog object.

Public Methods

Name

Description

CMFCKeyMapDialog::DoModal

Displays a keyboard mapping dialog box.

Protected Methods

Name

Description

CMFCKeyMapDialog::FormatItem

Called by the framework to build a string that describes a key mapping. By default, the string contains the command name, the shortcut keys used, and the shortcut key description.

CMFCKeyMapDialog::GetCommandKeys

Retrieves a string that contains a list of shortcut keys associated with the specified command.

CMFCKeyMapDialog::OnInsertItem

Called by the framework before a new item is inserted into the internal list control that supports the keyboard mapping control.

CMFCKeyMapDialog::OnPrintHeader

Called by the framework to print the header for the keyboard map on a new page.

CMFCKeyMapDialog::OnPrintItem

Called by the framework to print a keyboard mapping item.

CMFCKeyMapDialog::OnSetColumns

Called by the framework to set captions for the columns in the internal list control that supports the keyboard mapping control.

CMFCKeyMapDialog::PrintKeyMap

Called by the framework when a user clicks the Print button.

CMFCKeyMapDialog::SetColumnsWidth

Called by the framework to set the width of the columns in the internal list control that supports the keyboard mapping control.

Remarks

Use the CMFCKeyMapDialog class to implement a resizable keyboard mapping dialog box. The dialog box uses a list view control to display keyboard shortcuts and their associated commands.

To use the CMFCKeyMapDialog class in an application, pass in a pointer to the main frame window as a parameter to the CMFCKeyMapDialog constructor. Then call the DoModal method to start a modal dialog box.

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CDialog

            CDialogEx

               CMFCKeyMapDialog

Requirements

Header: afxkeymapdialog.h

See Also

Reference

Hierarchy Chart

CKeyboardManager Class

Other Resources

MFC Classes