Sign in to follow this  
Toolmaker

MFC drawing transparent checkbox

Recommended Posts

Toolmaker    967
I'm trying to get an MFC checkbox to draw itself with a transparent background, and at this point, I'm going nuts because nothing seems to work.

Initially, I figured I'd handle the WM_ERASEBKGND, BitBlt() to an in-memory bitmap and when re-painting paint the bitmap and voila. Alas, this didn't work and only made the control flicker when I move my mouse over, but still draws it's control coloured background. Next up was catching the WM_CTLCOLOR in the dialog. Same result though, still in it's original control background colour. I even tried the handle WM_CTLCOLOR_REFLECT in a derived control but that still doesn't work. I'm sort of lost here, since these are the solutions provided on the internet.

Any ideas here?

Toolmaker

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this