EM_SETREADONLY
A version of this page is also available for
4/8/2010
This message sets or removes the read-only style (ES_READONLY) of an edit control.
Syntax
EM_SETREADONLY
wParam = (WPARAM)(BOOL) fReadOnly;
lParam = 0L;
Parameters
- fReadOnly
Boolean value that 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. For more information, see Control Styles.
- lParam
Not used; set to 0.
Return Value
Nonzero indicates success. Zero indicates failure.
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 GetWindowLong function with the GWL_STYLE flag.
Requirements
Header | windows.h |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
GetWindowLong
Edit Boxes Messages