Partager via


IVsStatusbar.SetInsMode Method

Sets the mode of the editor in the status bar to either insert or overwrite.

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

Syntax

'Declaration
Function SetInsMode ( _
    ByRef pvInsMode As Object _
) As Integer
int SetInsMode(
    ref Object pvInsMode
)
int SetInsMode(
    [InAttribute] Object^% pvInsMode
)
abstract SetInsMode : 
        pvInsMode:Object byref -> int
function SetInsMode(
    pvInsMode : Object
) : int

Parameters

  • pvInsMode
    Type: Object%

    [in] Pointer to a VARIANT indicating the insert mode.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsStatusbar::SetInsMode(
   [in]VARIANT *pvInsMode
);

The insert or overwrite information is displayed in a specific panel of the editor information area of the status bar, which is used only by this method.

The VARIANT must be a VT_I4 or VT_BSTR. A VT_BSTR refers to the actual text that will be placed in the status bar to indicate the insert or overwrite mode of the editor window. A VT_I4 refers to the following enumeration:

enum

{

UIE_TEXTINSMODE_INSERT= 0, /* Writes "INS" in the status bar */

UIE_TEXTINSMODE_OVERSTRIKE = 1/* Writes "OVR" in the status bar */

};

When the VARIANT is a VT_I4, the method tests for UIE_TEXTINSMODE_INSERT; anything else is interpreted as UIE_TEXTINSMODE_OVERSTRIKE.

For more information about the VARIANT structure, refer to the Automation documentation in the Platform SDK of the MSDN Library.

.NET Framework Security

See Also

Reference

IVsStatusbar Interface

Microsoft.VisualStudio.Shell.Interop Namespace