IVsMenuEditor::GetItemRect Method (IVsMenuItem^, array<RECT>^, Int32)

 

Called to obtain the bounding rectangle for a specific menu item (pmi != NULL) or the bounding rectangle for all currently displayed menu windows (pmi == NULL).

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

int GetItemRect(
	IVsMenuItem^ pIMI,
	array<RECT>^ prc,
	int fForScrolling
)

Parameters

pIMI
Type: Microsoft.VisualStudio.Shell.Interop::IVsMenuItem^

[in] The menu item that the bounding rectangle will encompass.

prc
Type: array<Microsoft.VisualStudio.OLE.Interop::RECT>^

[out] The RECT structure that defines the boundaries of the rectangle.

fForScrolling
Type: System::Int32

[in] Indicates whether this method is getting an item rectangle for the purpose of scrolling it into view. If true, it is for the purpose of scrolling it into view. In this case, the Designer includes the items Popup rectangle and next item rectangle since these items may not yet be known by the Site, and thus there is no way to obtain their rectangles to make them visible.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

C++

From vsshell.idl:

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

Return to top
Show: