See here: How to get size of check and gap in check box?
It does not seem to quite answer the question as it applies to DPI.
I have tried several methods, but none yield the results of actual drawn checkboxes at various scale choices in Windows 10. The closest is
12 * GetDeviceCaps (LOGPIXELSX) / 96 + 1
This yields 22 pixels @ 168 DPI, however, but Windows draws a 20 pixel checkbox.
Is there a reliable way to determine this? Below is a grid of results I captured, with greens being those that match the "on screen" values.
