Edit_SetReadOnly macro (windowsx.h)

Sets or removes the read-only style (ES_READONLY) of an edit or rich edit control. You can use this macro or send the EM_SETREADONLY message explicitly.

Syntax

BOOL Edit_SetReadOnly(
   HWND hwndCtl,
   BOOL fReadOnly
);

Parameters

hwndCtl

Type: HWND

A handle to the control.

fReadOnly

Type: BOOL

TRUE to set the control to read-only; FALSE to remove the read-only style.

Return value

Type: BOOL

TRUE if the operation succeeds; otherwise FALSE.

Remarks

For more information, see EM_SETREADONLY.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header windowsx.h