A standard MFC CButton
checkbox on a color background looks like this:
I want to get rid of the gray margin, but can't get it to go away. No matter how I set the size of the control it still appears.
Changing it to an CMFCButton
gives this:
Which is good, it gets rid of the margin, except now there's no checkmark. I need that checkmark.
Is there any way to get the clean appearance with the checkmark? I had the thought of passing the standard set of images to CMFCControl::SetImage()
, but I don't see how to get them. I know I can draw everything myself, but I'm trying to avoid reinventing the wheel.
I know there are many similar questions here on SO, but none of the answers I found seem to apply. The closest I found was this: Once and for all: how do I get a fully transparent checkbox, button, radio button, etc. in Windows API, and not with a black background?; but the first answer there is very cryptic, and the second is a big chunk of code that seems like overkill.