共用方式為


IVsCodeWindow.SetViewClassID Method

Sets the text view class to change or query.

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

Syntax

'宣告
Function SetViewClassID ( _
    ByRef clsidView As Guid _
) As Integer
'用途
Dim instance As IVsCodeWindow
Dim clsidView As Guid
Dim returnValue As Integer

returnValue = instance.SetViewClassID(clsidView)
int SetViewClassID(
    ref Guid clsidView
)
int SetViewClassID(
    [InAttribute] Guid% clsidView
)
abstract SetViewClassID : 
        clsidView:Guid byref -> int 
function SetViewClassID(
    clsidView : Guid
) : int

Parameters

  • clsidView
    Type: System.Guid%
    [in] Class identifier of the text view to change.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

The code window by default uses CLSID_IVsTextView for the edit panes. To access the class identifier of the view class, call GetViewClassID.

COM Signature

From textmgr.idl:

HRESULT IVsCodeWindow::SetViewClassID(
   [in] REFCLSID clsidView
);

.NET Framework Security

See Also

Reference

IVsCodeWindow Interface

IVsCodeWindow Members

Microsoft.VisualStudio.TextManager.Interop Namespace