次の方法で共有


IVsUIShell.FindToolWindowEx(UInt32, Guid, UInt32, IVsWindowFrame) Method

Definition

Returns the IVsWindowFrame pointer for the requested single- or multi-instance tool window.

public:
 int FindToolWindowEx(System::UInt32 grfFTW, Guid % rguidPersistenceSlot, System::UInt32 dwToolWinId, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ % ppWindowFrame);
public int FindToolWindowEx (uint grfFTW, ref Guid rguidPersistenceSlot, uint dwToolWinId, out Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame ppWindowFrame);
abstract member FindToolWindowEx : uint32 * Guid * uint32 * IVsWindowFrame -> int
Public Function FindToolWindowEx (grfFTW As UInteger, ByRef rguidPersistenceSlot As Guid, dwToolWinId As UInteger, ByRef ppWindowFrame As IVsWindowFrame) As Integer

Parameters

grfFTW
UInt32

[in] Provides criteria used to find a tool window in the environment. For more information, see __VSFINDTOOLWIN.

rguidPersistenceSlot
Guid

[in] Unique identifier for a tool window created using CreateToolWindow(UInt32, UInt32, Object, Guid, Guid, Guid, IServiceProvider, String, Int32[], IVsWindowFrame). The caller of this method can use predefined identifiers that map to tool windows if those tool windows are known to the caller.

dwToolWinId
UInt32

[in] Identifier of the requested tool window in the multi-instanced tool window. The first instance of a multi-instance tool window has an identifier of zero, the second instance has an identifier of one, and so on.

ppWindowFrame
IVsWindowFrame

[out] Pointer to the IVsWindowFrame interface of the desired tool window

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::FindToolWindowEx(  
   [in] VSFINDTOOLWIN grfFTW,  
   [in] REFGUID rguidPersistenceSlot,  
   [in] DWORD dwToolWinId,  
   [out] IVsWindowFrame **ppWindowFrame  
);  

This method requires that a fully-created tool window exist. Because of the delayed creation of tool windows, a valid window frame may exist, but the window might not have been created yet. If the window frame is not filled with an object then the environment fails and the parent routine is responsible for finishing creating the window. However, if you specify a value of FTW_fForceCreate for the grfFTW parameter, then the environment attempts to create the tool window for you. If you specify a value of FTW_fFrameOnly, then the environment returns a pointer to window frame, even if the window frame is not populated with an object. Use the FTW_fFrameOnly value to set a property on the window frame for a tool window, in which case a fully-created tool window is not required.

Applies to