Share via


IVsUIShell.FindToolWindow(UInt32, Guid, IVsWindowFrame) Method

Definition

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

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

ppWindowFrame
IVsWindowFrame

[out] Pointer to the IVsWindowFrame object containing the 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::FindToolWindow(  
   [in] VSFINDTOOLWIN grfFTW,  
   [in] REFGUID rguidPersistenceSlot,  
   [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 may 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