CRichEditCtx.SetReadOnlymethod
Sets or removes the read-only style (ES_READONLY) of a rich edit control.
Syntax
FUNCTION SetReadOnly (BYVAL fReadOnly AS LONG) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
fReadOnly | Specifies whether to set or remove the ES_READONLY style. A value of TRUE sets the ES_READONLY+* style; a value of **FALSE removes the ES_READONLY style. |
Return value
Returns the boolean true (-1) or false (0).
Description
Sets or removes the read-only style (ES_READONLY) of a rich edit control.
Remarks
When an edit control has the ES_READONLY style, the user cannot change the text within the edit control.
To determine whether an edit control has the ES_READONLY style, use the Windows API GetWindowLong function with the GWL_STYLE flag.
Reference
- Defined in AfxNova/CRichEditCtx.inc:3001
- Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
- Topic: CRichEditCtx Class