Vitucho
July 7th, 2007, 07:41 PM
Hi!.
I know how to change the control back and fore color of a window class, but only when inside the parent window procedure by cachting the message WM_CTLCOLOR{SHORT NAME OF CONTROL}: and establishing
SetTextColor((HDC)wParam,A COLOREF to the fore color (text color));
SetBkColor((HDC)wParam,A COLOREF to the back color of text);
return hBrush; // brush to fill the background color of the component
But if a wanna to use my own custom control with his own procedure for rewrite some behavior (apart from the graphical) and i don't want to add these lines of code into the window parent control instead how i can do it inside a control window procedure?.
So, the question is, what i have to do to modify the back and fore color of a component inside hiw own personalised window procedure. Important note: I can use the WM_PAINT message and redefine it..but in cases of list_box, combo_box this task may take some time to it, so i preffer to ask if there is anyway of simple change the colours.
THanks for reading it!.
Vitucho!.
I know how to change the control back and fore color of a window class, but only when inside the parent window procedure by cachting the message WM_CTLCOLOR{SHORT NAME OF CONTROL}: and establishing
SetTextColor((HDC)wParam,A COLOREF to the fore color (text color));
SetBkColor((HDC)wParam,A COLOREF to the back color of text);
return hBrush; // brush to fill the background color of the component
But if a wanna to use my own custom control with his own procedure for rewrite some behavior (apart from the graphical) and i don't want to add these lines of code into the window parent control instead how i can do it inside a control window procedure?.
So, the question is, what i have to do to modify the back and fore color of a component inside hiw own personalised window procedure. Important note: I can use the WM_PAINT message and redefine it..but in cases of list_box, combo_box this task may take some time to it, so i preffer to ask if there is anyway of simple change the colours.
THanks for reading it!.
Vitucho!.