调用以获取特定菜单项 (pmi 边框! = 则为 null) 或所有当前显示的菜单窗口 (pmi == NULL) 边框。fForScrolling = true ,则允许项矩形输入为移动到视图。在这种情况下,设计器包括项目弹出矩形和下一项矩形,因为这些项目不可由网站,了解,因此无法获取其矩形使其变为可见。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)
语法
声明
Function GetItemRect ( _
pIMI As IVsMenuItem, _
<OutAttribute> prc As RECT(), _
fForScrolling As Integer _
) As Integer
int GetItemRect(
IVsMenuItem pIMI,
RECT[] prc,
int fForScrolling
)
参数
- pIMI
类型:Microsoft.VisualStudio.Shell.Interop.IVsMenuItem
[in]
- prc
类型:array<Microsoft.VisualStudio.OLE.Interop.RECT[]
[out]
- fForScrolling
类型:System.Int32
[in]
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
C++
从 vsshell.idl:
HRESULT IVsMenuEditor::GetItemRect([in]IVsMenuItem* pIMI, [out]LPRECT prc, [in]BOOL fForScrolling);
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。