• Advertisement
Sign in to follow this  

MFC drawing transparent checkbox

This topic is 2659 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
I assume you've checked out http://www.eggheadcafe.com/software/aspnet/31647019/transparent-checkboxradiobox.aspx

There still seems to be a difference between Unicode and Non Unicode (Unicode still seems to be using Version 6 common controls), and following it's advice and creating my own manifest seemed to work if set in Unicode mode.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement