I was wondering if anyone can show me how to change an edit box control to static, or if not, at least make it read only? I would also need to change it back.
You would use the EM_SETREADONLY message (http://msdn.microsoft.com/en-us/library/windows/desktop/bb761655%28v=vs.85%29.aspx) to change the edit control to read only and back.
You could also disable it if the user shouldn't even be allowed to copy the contents of the edit control.
That worked. Thanks!! Question. How come EM_SETREADONLY and not ES_READONLY?
EM = Edit Message ... you use the message to change the behavior of the control after it is created
ES = Edit Style ... you can only apply the style when you create the control
To change the style without the message, you would need the GetWindowLong and SetWindowLong functions, see the remarks of the page linked above.
Always make sure to read the whole page, especially the remarks and requirements.