Help Center

CRichEditCtx.SetTextmethod

Windowsmethoddocumented

Syntax

FUNCTION SetText (BYREF wszText AS WSTRING) AS BOOLEAN
Also documented as Text — one description covers them all.

Parameters

NameDescription
wszTextA WSTRING with the new text.

Return value

(GET) The retrieved text.

(SET) The return value is TRUE if the text is set. Call GetErrorInfo to get information about the result.

Description

Gets/sets the text from a rich edit control.

Remarks

The Windows API function GetWindowTextW can also be used to retrieve the text of a rich edit control, but it cannot retrieve the text of a control in another application.

Examples

(GET) PROPERTY Text () AS DWSTRING (SET) PROPERTY Text (BYREF wszText AS WSTRING)

DIM dws AS DWSTRING = pRichEdit.Text

DIM dws AS DWSTRING = "New text" pRichEdit.Text = dws

Reference

  • Defined in AfxNova/CRichEditCtx.inc:1782
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class