Hi.

I'm trying to use SetBkColor to change the background color of my control. In XP I can see the result, but in Vista no affect, the default backgound color it taken.

Any ideas?
Thanks.

Painting Vista controls can be unpredictable because of the Aero theme. If you disable the Aero theme, you will probably find that your code works, however if you want it to work either way, you can try drawing it manually by using the WM_ERASEBKGND handler.

I once did an entire game that runs on the Windows API, I never thought to check if it works with XP or lower, and because of that there's some big painting bugs on anything but Vista.

commented: Advice from an experienced WinAPI user :) +24
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.