CMFCToolBarsCustomizeDialog::OnAssignKey

Validates keyboard shortcuts as a user defines them.

virtual BOOL OnAssignKey(
   ACCEL* pAccel 
);

Parameters

  • [in, out] pAccel
    Pointer to the proposed keyboard assigment that is expressed as an ACCEL struct.

Return Value

TRUE if the key can be assigned, or FALSE if the key cannot be assigned. The default implementation always returns TRUE.

Remarks

Override this method in a derived class to perform extra processing when a user assigns a new keyboard shortcut, or to validate keyboard shortcuts as the user defines them. To prevent a shortcut from being assigned, return FALSE. You should also display a message box or otherwise inform the user of the reason why the keyboard shortcut was rejected.

Requirements

Header: afxToolBarsCustomizeDialog.h

See Also

Reference

CMFCToolBarsCustomizeDialog Class

Hierarchy Chart