EM_SETREADONLY

This message is sent by an application to set or remove the read-only style (ES_READONLY) of an edit control.

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.

Return Values

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

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

Control Styles, GetWindowLong

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.