DocumentManager.UpdateCaption Method

Updates the captions of all the windows associated with the document.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Public Shared Sub UpdateCaption ( _
    site As IServiceProvider, _
    caption As String, _
    docData As IntPtr _
)
'使用
Dim site As IServiceProvider
Dim caption As String
Dim docData As IntPtr

DocumentManager.UpdateCaption(site, caption, _
    docData)
public static void UpdateCaption(
    IServiceProvider site,
    string caption,
    IntPtr docData
)
public:
static void UpdateCaption(
    IServiceProvider^ site, 
    String^ caption, 
    IntPtr docData
)
public static function UpdateCaption(
    site : IServiceProvider, 
    caption : String, 
    docData : IntPtr
)

Parameters

  • docData
    Type: System.IntPtr

    Pointer to a document data object associated with the file.

Remarks

Using the [System.IServiceProvider] interface, this method retrieves the IVsUIShell interface pointing to the SVsUIShell service, which owns the document windows. From the shell it retrieves an IEnumWindowFrames enumerator for the document windows and iterates through the windows. If the pointer to the document data object is the same as that of the window frame, it updates the caption.

This method throws [System.ArgumentNullException] if the service provider is null. Throws [System.ArgumentException] if the caption is empty or null. It throws other exceptions if there are errors updating the windows.

Permissions

See Also

Reference

DocumentManager Class

DocumentManager Members

Microsoft.VisualStudio.Package Namespace