How to correctly determine the radius of a corner for a thematic window

I am trying to find a way to determine the radius of the thematic corner of the window (see the figure). For instance. for the Aero theme, when DWM is at all corners, it has a radius of 8, when DWM is off, only the top corners are curved and have a radius of 6. Right now I am set to hard settings for different topics, and my questions are a more intelligent way to detect these settings ?

window corner

So far, I have looked at the visual styles of the api window (UxTheme.dll) and could not find how to get the correct radius, it is always the same for Aero regardless of whether DWM is enabled.

TIA

+4
source share
1 answer

Not sure about that. You can try using SystemParametersInfo with SPI_GETNONCLIENTMETRICS and look at the result of the NONCLIENTMETRICS struct iBorderWidth and iPaddedBorderWidth to see if you can find the correlation?

0
source

Source: https://habr.com/ru/post/1344709/


All Articles