Hi, all :)
I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color?
Thanks in advance
Printable View
Hi, all :)
I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color?
Thanks in advance
AFAIK you have to intercept the WM_PAINT message for that control in order to do it.
Look up the WM_CTLCOLORSTATIC Notification message on MSDN.
WM_CTLCOLORSTATIC Notification
A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control.
Thanks guys :D