My custom Table control draws its own checkboxes and handles its own checkbox events. Right now when I compute the size of a themed checkbox (with GetThemePartSize()
) I make sure all states are the same size, panicking if one is different. Checking all the states each time isn't reasonable if I'm going to change to computing checkbox sizes on the fly (passing in an HDC
), and this does seem like a time when I can act more robustly than panicking (especially since I'm restructuring all my control's code anyway).
Can I assume that all themed checkbox states have the same size? And if not, how do I handle the size differences for the purposes of drawing: do I always use the largest size, and if so where do I draw smaller checkboxes relative to the largest size, or do I do something else? And for hit-testing: do I always consider the largest size?
The old "Windows XP Visual Guidelines" document suggests that they all should be the same size, but that doesn't guarantee anything for future versions of Windows (nor am I aware of similar documents for future versions of Windows). I see nothing else on MSDN or in the header files.
I'm specifically talking about uxtheme here; I don't know about nonthemed checkboxes (right now I just use the small icon size for all states, but I'm sure there's a better way to get the size that I don't know about...).
Thanks.