Share via


IVsFilterKeys.TranslateAccelerator(MSG[], UInt32, Guid, UInt32) Method

Definition

Takes a Windows message, translates it into a command, and, optionally, executes the command.

public:
 int TranslateAccelerator(cli::array <Microsoft::VisualStudio::OLE::Interop::MSG> ^ pMsg, System::UInt32 dwFlags, [Runtime::InteropServices::Out] Guid % pguidCmd, [Runtime::InteropServices::Out] System::UInt32 % pdwCmd);
public int TranslateAccelerator (Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg, uint dwFlags, out Guid pguidCmd, out uint pdwCmd);
abstract member TranslateAccelerator : Microsoft.VisualStudio.OLE.Interop.MSG[] * uint32 * Guid * uint32 -> int
Public Function TranslateAccelerator (pMsg As MSG(), dwFlags As UInteger, ByRef pguidCmd As Guid, ByRef pdwCmd As UInteger) As Integer

Parameters

pMsg
MSG[]

[in] Pointer to the Windows message.

dwFlags
UInt32

[in] Bit flags to determine whether or not to perform default actions, or to execute the command. Values formed from the __VSTRANSACCELFLAGS enumeration.

pguidCmd
Guid

[out] Pointer to the GUID of the corresponding command.

pdwCmd
UInt32

[out] Pointer to the identifier of the command.

Returns

If the message does or will translate to a command, the method returns S_OK and fills the pguidCmd and pdwCmd parameters with the command's GUID and ID. If the message does not or will not translate to a command, the method returns S_FALSE, and sets the two parameters to zero.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsFilterKeys::TranslateAccelerator(  
   [in] LPMSG pMsg,   
   [in] VSTRANSACCELFLAGS dwFlags,   
   [out] GUID *pguidCmd,   
   [out] DWORD *pdwCmd  
);  

Applies to