How to correctly detect the corner radius for themed window
I'm trying to find a way to detect the radius of the themed window corner (pls, see the picture attached). E.g. for Aero theme when DWM is on all corners have radius开发者_C百科 8, when DWM is off only top corners are curvy and have radius 6. Right now I'm hardcoding settings for different themes, and my questions is there more intelligent way of detecting these settings?
So far I looked to the windows visual styles api (UxTheme.dll) and can't find how to get the correct radius, it always the same for Aero no matter if DWM is on or off.
TIA
Not sure on this one. You might try using SystemParametersInfo with SPI_GETNONCLIENTMETRICS and looking at the resultant NONCLIENTMETRICS struct's iBorderWidth and iPaddedBorderWidth to see if you can find a correlation?
精彩评论