IOleControl::OnMnemonic method (ocidl.h)
Informs a control that the user has pressed a keystroke that represents a keyboard mnemonic.
Syntax
HRESULT OnMnemonic(
[in] MSG *pMsg
);
Parameters
[in] pMsg
A pointer to the MSG structure describing the keystroke to be processed.
Return value
This method can return the standard return values E_INVALIDARG and E_UNEXPECTED, as well as the following values.
Return code | Description |
---|---|
|
The method completed successfully. |
|
The control does not handle mnemonics. This indicates an unexpected condition and a caller error. For example, the caller has mismatched which control has which mnemonic. |
Remarks
The keystroke must match one of the ACCEL entries in the mnemonic table returned through IOleControl::GetControlInfo. The control takes whatever action is appropriate for the keystroke.
Notes to Callers
A container of a control is allowed to cache the control's CONTROLINFO structure, provided that the container implements IOleControlSite::OnControlInfoChanged to know when it must update its cached information.Notes to Implementers
If a control changes the contents of its CONTROLINFO structure, it must notify its container by calling IOleControlSite::OnControlInfoChanged.Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ocidl.h |