Click to See Complete Forum and Search --> : How can i change text background of STATIC?


r4BBiT
May 11th, 2003, 10:07 PM
Hi all,

Im trying to change text color and text background of static window, but for now im stuck. Im new in api. I changed static's background by catching WM_CTLCOLORSTATIC message and returning color i want, but text background still remains grey. Any idea how to change it? Thanks in advance.

rxbagain
May 12th, 2003, 01:24 AM
You have to call SetBkColor.

SetBkColor((HDC)wParam, bkcolor);

Hope it will help you

r4BBiT
May 12th, 2003, 01:51 AM
Thanks for reply, SetBkColor() works fine. And i found SetTextColor() (I like this naming) so i can change color of my text aswell.