共用方式為


IVsUIShell Interface

Definition

This interface provides access to basic windowing functionality, including access to and creation of tool windows and document windows.

public interface class IVsUIShell
public interface class IVsUIShell
__interface IVsUIShell
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("B61FC35B-EEBF-4DEC-BFF1-28A2DD43C38F")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsUIShell
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("B61FC35B-EEBF-4DEC-BFF1-28A2DD43C38F")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsUIShell
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("B61FC35B-EEBF-4DEC-BFF1-28A2DD43C38F")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsUIShell = interface
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("B61FC35B-EEBF-4DEC-BFF1-28A2DD43C38F")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsUIShell = interface
Public Interface IVsUIShell
Attributes

Remarks

Use the service SVsUIShell to get this interface when VSPackages, projects or editors need to create or enumerate tool or document windows

Notes to Implementers

Implemented by the environment.

Methods

AddNewBFNavigationItem(IVsWindowFrame, String, Object, Int32)

Adds a new backward and forward navigation item.

CenterDialogOnWindow(IntPtr, IntPtr)

Centers the provided dialog box HWND on the parent HWND (if provided), or on the main IDE window.

CreateDocumentWindow(UInt32, String, IVsUIHierarchy, UInt32, IntPtr, IntPtr, Guid, String, Guid, IServiceProvider, String, String, Int32[], IVsWindowFrame)

This method creates a document window containing the embedding indicated by the punkDocView parameter.

CreateToolWindow(UInt32, UInt32, Object, Guid, Guid, Guid, IServiceProvider, String, Int32[], IVsWindowFrame)

This method creates a tool window containing the embedding indicated by punkDocView, or the clsidDocView parameter, if the punkDocView parameter is null.

EnableModeless(Int32)

Enables or disables a frame's modeless dialog box.

FindToolWindow(UInt32, Guid, IVsWindowFrame)

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

FindToolWindowEx(UInt32, Guid, UInt32, IVsWindowFrame)

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

GetAppName(String)

Returns the name of the application.

GetCurrentBFNavigationItem(IVsWindowFrame, String, Object)

Returns the current backward and forward navigation item.

GetDialogOwnerHwnd(IntPtr)

Returns the HWND that can be used to parent modal dialogs.

GetDirectoryViaBrowseDlg(VSBROWSEINFOW[])

Brings up the Browse dialog box to find a directory location.

GetDocumentWindowEnum(IEnumWindowFrames)

Returns an enumerator that iterates through all existing document windows in the environment.

GetErrorInfo(String)

Gets the text of error messages.

GetNextBFNavigationItem(IVsWindowFrame, String, Object)

Returns the next backward and forward navigation item.

GetOpenFileNameViaDlg(VSOPENFILENAMEW[])

Brings up the Open dialog box to obtain an open file name.

GetPreviousBFNavigationItem(IVsWindowFrame, String, Object)

Returns the previous backward and forward navigation item.

GetSaveFileNameViaDlg(VSSAVEFILENAMEW[])

Brings up the Save As dialog box to save a file.

GetToolWindowEnum(IEnumWindowFrames)

Returns an enumerator that iterates through all of the existing tool windows in the environment.

GetURLViaDlg(String, String, String, String)

Brings up Open Project From Web dialog box to obtain a URL from a user.

GetVSSysColor(VSSYSCOLOR, UInt32)

This method is deprecated. Use GetVSSysColorEx(Int32, UInt32) instead.

OnModeChange(DBGMODE)

Internal method. Do not use.

PostExecCommand(Guid, UInt32, UInt32, Object)

Allows asynchronous execution of commands.

PostSetFocusMenuCommand(Guid, UInt32)

Sets focus in a combo box.

RefreshPropertyBrowser(Int32)

Makes it possible for a project (or any other selected object being browsed by the Properties window) to keep the Properties window in sync with property changes without implementing IConnectionPointContainer and firing OnChanged(Int32) events.

RemoveAdjacentBFNavigationItem(RemoveBFDirection)

Removes an adjacent navigation item in the specified direction.

RemoveCurrentNavigationDupes(RemoveBFDirection)

Removes navigation duplicates in backward and forward navigation.

ReportErrorInfo(Int32)

Helper method that displays an error message to the user.

SaveDocDataToFile(VSSAVEFLAGS, Object, String, String, Int32)

Helper method used by editors that implement the IVsPersistDocData interface.

SetErrorInfo(Int32, String, UInt32, String, String)

Helper method that records rich information about an error.

SetForegroundWindow()

Activates the environment application window by calling the SetForegroundWindow Win32 API.

SetMRUComboText(Guid, UInt32, String, Int32)

Adds information to a combo box list.

SetMRUComboTextW(Guid[], UInt32, String, Int32)

Adds information to a combo box list.

SetToolbarVisibleInFullScreen(Guid[], UInt32, Int32)

Sets the toolbar to visible when the window is in full-screen mode.

SetupToolbar(IntPtr, IVsToolWindowToolbar, IVsToolWindowToolbarHost)

Called by VSPackage that creates a tool window in order to attach a toolbar to the tool window.

SetWaitCursor()

Changes the cursor to the hourglass cursor.

ShowContextMenu(UInt32, Guid, Int32, POINTS[], IOleCommandTarget)

Shows the context menu for the active menu object.

ShowMessageBox(UInt32, Guid, String, String, String, UInt32, OLEMSGBUTTON, OLEMSGDEFBUTTON, OLEMSGICON, Int32, Int32)

Manages implementation of a message box event.

TranslateAcceleratorAsACmd(MSG[])

Causes the environment to use the active key binding table to convert, if possible, a keyboard message into the appropriate command, then route the command using the usual command routing mechanism.

UpdateCommandUI(Int32)

Informs the environment to update the state of the command bars (menus and toolbars).

UpdateDocDataIsDirtyFeedback(UInt32, Int32)

Makes it possible for a document data object to synchronously inform the environment when their document must be changed.

Applies to