I'm a bit of a newbie to all this Win32 programming stuff, having most
of my experience in DOS.
I'm using CreateWindow("EDIT" .... to create a multiline edit control
but I can't seem to be able to specify (or even to change) it's colour.
Can anyone help?
P.S. Please could you CC this to my email as I can't access the NGs in
If you are creating controls in a dialog, you have to handle the
to change their colors.
For edit controls this will be WM_CTLCOLOREDIT.
In the dialog box procedure of the edit control parent use something like:
static HBRUSH hEditBrush;
hEditBrush = CreateSolidBrush(RGB(0, 0, 128));
Note that you have the responsibility for creating AND deleting the
It can be declared as a local static in the dialog box procedure, on
WM_INITDIALOG, create the brush,
and on WM_DESTROY delete the brush.
P.S. Is no...@noone.com your e-mail address ???
No, it is not, as I suspected. The mail returned .
So, please, give real e-mail address if you want something sent to you.