IVsFilterKeys.TranslateAccelerator 方法

获取窗口消息,将其转换为命令,,因此,可选择,执行命令。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Function TranslateAccelerator ( _
    pMsg As MSG(), _
    dwFlags As UInteger, _
    <OutAttribute> ByRef pguidCmd As Guid, _
    <OutAttribute> ByRef pdwCmd As UInteger _
) As Integer
int TranslateAccelerator(
    MSG[] pMsg,
    uint dwFlags,
    out Guid pguidCmd,
    out uint pdwCmd
)

参数

  • pguidCmd
    类型:System.Guid%
    [out] 为相应的命令 GUID 的指针。
  • pdwCmd
    类型:System.UInt32%
    [out] 为命令的标识符的指针。

返回值

类型:System.Int32
如果消息执行或转换为命令,方法返回 S_OK 并带命令的 GUID 和 ID. 加载 pguidCmd 和 pdwCmd 参数如果消息不也无法转换为命令,方法返回 S_FALSE,并将两个参数为零。

备注

COM 签名

从 vsshell.idl:

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

.NET Framework 安全性

请参见

参考

IVsFilterKeys 接口

Microsoft.VisualStudio.Shell.Interop 命名空间