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
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
We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.
AFAIK you have to intercept the WM_PAINT message for that control in order to do it.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
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
We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.