Click to See Complete Forum and Search --> : Change the color of a CButton?


Magnus Ohlin
May 4th, 1999, 09:04 AM
Hiya!

How do I change the color of a CButton? How do I change the color of a text in a CButton?

Thanks
Magnus

Rudolf
May 5th, 1999, 01:35 AM
Hi,
did You try WM_CTLCOLOR in the dialog class the button belongs to?
Rudolf

Rakesh Verma
May 5th, 1999, 09:09 AM
Hi,

For this you need to do two changes:

1. the style of the button need to be owner draw.
2. Trap WM_CTLCOLOR message.

Hope this would help you.


Regards,
Rakesh

Rakesh Verma
SSI, New Delhi
rverma@velos.ssind.com

Kiesha
May 5th, 1999, 09:32 AM
Try to catch WM_ERASEBKGND.
Or try Ownerdraw :))))).

Kiesha