Partager via


IVsUIShell.TranslateAcceleratorAsACmd(MSG[]) Method

Definition

Causes the environment to use the active key binding table to convert, if possible, a keyboard message into the appropriate command, then route the command using the usual command routing mechanism.

public:
 int TranslateAcceleratorAsACmd(cli::array <Microsoft::VisualStudio::OLE::Interop::MSG> ^ pMsg);
int TranslateAcceleratorAsACmd(std::Array <Microsoft::VisualStudio::OLE::Interop::MSG> const & pMsg);
public int TranslateAcceleratorAsACmd (Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg);
abstract member TranslateAcceleratorAsACmd : Microsoft.VisualStudio.OLE.Interop.MSG[] -> int
Public Function TranslateAcceleratorAsACmd (pMsg As MSG()) As Integer

Parameters

pMsg
MSG[]

[in] Pointer to a message structure.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::TranslateAcceleratorAsACmd(  
   [in] LPMSG pMsg  
);  

This method is intended to be called by in-place components in their implementation of TranslateCntrAccelerator. This makes it possible for the in-place component to give priority for keystrokes to the usual command bindings of the environment before making it possible for them to be handled by a nested OLE object.

Applies to