IVsExpansionIntellisenseHost::SetText Method (String^, Int32)

 

Replaces the text span within an expansion selection with new text.

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

int SetText(
	String^ bstrText,
	int fReplaceAll
)

Parameters

bstrText
Type: System::String^

[in] A string containing the new text.

fReplaceAll
Type: System::Int32

[in] If fReplaceAll is true, SetText replaces all text in the buffer (including prefix text). Otherwise, SetText replaces anything within the selection or insert at the selection location if there is a zero-length selection.

Return Value

Type: System::Int32

If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.

C++

From singlefileeditor.idl:

HRESULT IVsExpansionIntellisenseHost::SetText([in] BSTR bstrText, [in] BOOL fReplaceAll);

Return to top
Show: