请求一就地 VSPackage 对象转换命令快捷键。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)
语法
声明
Function TranslateCntrAccelerator ( _
pMsg As MSG() _
) As Integer
int TranslateCntrAccelerator(
MSG[] pMsg
)
参数
- pMsg
类型:array<Microsoft.VisualStudio.OLE.Interop.MSG[]
[in] 以命令快捷键需要处理的键盘消息的指针。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 oleipc.idl:
HRESULT IOleInPlaceComponent::TranslateCntrAccelerator([in] MSG *pMsg);
TranslateCntrAccelerator 方法在活动对象标识的 UI 后调用它不能处理命令快捷键。
TranslateCntrAccelerator 方法的语义与 TranslateAccelerator;因此, Vspackage 可以通过包装调用实现 TranslateCntrAccelerator 到窗口中的 TranslateAccelerator 功能。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。