Author: Bob MastaBob Masta
Date: Jul 4, 2008 11:56
Hello, all:
I'd like to be able to change the color of an edit control during
program operation, as a status indicator. From what I've read,
anything involving control color requires subclassing, so that's what
I'm trying to do.
The control (with a lot of other controls) is on my main window, which
is itself a dialog created with CreateDialogParam. As soon as I
create the main window, I get the handle of the control to be
subclassed via GetDlgItem and call SetWindowLong to subclass it to my
custom window handler. I know this is getting messages, but it never
gets WM_CTLCOLOREDIT, which is the one I think I need to handle to
change the control background color.
Can it be that this message is sent only once, when the control is
first created, and by the time my subclass is up and running it's too
late? If so, what can I do to force the issue? Or is there a better
way to do this whole thing? How about changing text color instead...
would that be easier (and if so, what message do I respond to)?
Many thanks!
Bob Masta
|