Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Instructs the control site to process the keystroke described in pMsgand modified by the flags in grfModifiers.

Syntax

HRESULT TranslateAccelerator( 
  LPMSG 
pMsg ,
  DWORD 
grfModifiers 
);

Parameters

pMsg

[in] Pointer to the MSGstructure describing the keystroke to be processed.

grfModifiers

[in] Flags describing the state of the Control, Alt, and Shift keys. The value of the flag can be any valid KEYMODIFIERS enumeration values.

Return Value

This method supports the following return values:

Value Description

S_OK

The container processed the message.

E_NOTIMPL

The container does not implement accelerator support.

S_FALSE

The container did not process the message. This value must also be returned in all other error cases besides E_NOTIMPL.

Remarks

This method is called by a control that can be UI-active. In such cases, a control can process all keystrokes first through IOleInPlaceActiveObject::TranslateAccelerator, according to normal OLE Compound Document rules. Inside that method, the control can give the container certain messages to process first by calling IOleControlSite::TranslateAcceleratorand using the return value to determine if any processing took place. Otherwise, the control always processes the message first. If the control does not use the keystroke as an accelerator, it passes the keystroke to the container through this method.

Requirements

Header ocidl.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

COM Interfaces