Jump to content
  • Advertisement
Sign in to follow this  

MFC drawing transparent checkbox

This topic is 2806 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?


Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!