How to create a flat button in WinAPI with a visual style

I wanted to create a flat image button, for example, the Windows 7 mute button.

Here is the image: flat button

enter image description here

When the mouse hovers over it (display border): flat button rotation

enter image description here

I tried using the BS_FLAT style, but nothing changed. My code uses visual style. When I try to use BS_FLAT without a visual style, it looks flat but still has a border with one pixel.

So, I want the button to look flat and without a border, but when the mouse moved it, it became a regular button. How to achieve this?

+4
source share
1 answer

Create a toolbar with a single button. When creating the TBSTYLE_FLAT style. I think you will need CCS_NOPARENTALIGN | CSS_NORESIZE | CCS_NODIVIDER style CCS_NOPARENTALIGN | CSS_NORESIZE | CCS_NODIVIDER CCS_NOPARENTALIGN | CSS_NORESIZE | CCS_NODIVIDER CCS_NOPARENTALIGN | CSS_NORESIZE | CCS_NODIVIDER .

+4
source

All Articles