tags:

views:

40

answers:

2

How can I set the backcolor of a control (equivilant of control.backcolor in .Net). I tried setBKColor with no luck.

ex: TabHwnd = createWindowEx(NULL,WC_TAB....

then how could I set the back color of TabHwnd?

Thanks

A: 

Try subclassing (see SetClassLong) and process WM_ERASEBKGND

Pavel Radzivilovsky
There's no WinAPI function to do such a thing?
Milo
Certainly not. But subclassing is not that hard..
Pavel Radzivilovsky
+2  A: 

Windows will generate a message when it's painting the background of a control, and it is up to your program to respond to the message appropriately.

Mark Ransom