vardis
asked on
How to Change color of a CEdit
I would like to change the color of a CEdit control. Can it be done?
Please help..
Please help..
Catch the OnCtlColor message of the CWnd
// Code
if(nCtlColor == CTLCOLOR_EDIT)
{
pDC->SetBkColor(RGB(255,25 5,255));
return CreateSolidBrush(RGB(255,2 55,255));
}
// Code
if(nCtlColor == CTLCOLOR_EDIT)
{
pDC->SetBkColor(RGB(255,25
return CreateSolidBrush(RGB(255,2
}
ASKER
Thank you jubjub for the answer
The code works fine but there is a problem when it is executed it changes the color of ALL CEdit controls
Is there a way of changing color of just one?
Thanks
The code works fine but there is a problem when it is executed it changes the color of ALL CEdit controls
Is there a way of changing color of just one?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you payne for a very informative and detailed explanation I'll try your suggestion/solution. It has answered my question.
Regards Vardis.
Regards Vardis.
ASKER