I created a transparent checkbox in Win32 C ++. I did this because, as far as I know, you do not have a transparent flag in native win32, and I need to use this flag in the NSIS installer.
My problem: When redrawing, I don’t know how to erase the transparent background so that I can draw a “transparent canvas”. This is important when the user changes the text inside the checkbox, and I need to redraw it. I think I ran into a problem that everyone should get with transparent windows.
How can I clear a transparent window . Note that I am familiar with WinAPI that you cannot really clear the AFAIK window because you are simply redrawing the window. So I'm looking for advice on what methods I can use to redraw the window, for example:
- Send a repaint message to the parent window, which we hope will repaint the parent (which sits under this flag) without sending the message to its children (i.e., the flag). I tried this, it makes the checkbox a lot of flicker.
- Perhaps this is a transparent brush / paint function. I don’t know what I could use for drawing the whole window of a checkbox that essentially clears the window? I tried this, for some reason it closes the check box?
My code is:
case WM_SET_TEXT: {
source share