IVsMenuEditor.GetItemRect 方法

调用以获取特定菜单项 (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
)

参数

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

C++

从 vsshell.idl:

HRESULT IVsMenuEditor::GetItemRect([in]IVsMenuItem* pIMI, [out]LPRECT prc, [in]BOOL fForScrolling);

.NET Framework 安全性

请参见

参考

IVsMenuEditor 接口

Microsoft.VisualStudio.Shell.Interop 命名空间