Edit Control Styles
To create an edit control using the CreateWindow or CreateWindowEx function, specify the EDIT class, appropriate window style constants, and a combination of the following edit control styles. After the control has been created, these styles cannot be modified, except as noted.
ES_READONLY Prevents the user from typing or editing text in the edit control.
To change this style after the control has been created, use the EM_SETREADONLY message.