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

 

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

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int TranslateAccelerator(
	MSG[] pMsg,
	uint dwFlags,
	out Guid pguidCmd,
	out uint pdwCmd
)

Parameters

pMsg
Type: Microsoft.VisualStudio.OLE.Interop.MSG[]

[in] Pointer to the Windows message.

dwFlags
Type: System.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
Type: System.Guid

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

pdwCmd
Type: System.UInt32

[out] Pointer to the identifier of the command.

Return Value

Type: System.Int32

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.

From vsshell.idl:

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