user interface - How to determine the size of the button portion of a Windows radio button -


i'm drawing old school (unthemed - themed radios whole other problem) radio buttons myself using drawframecontrol:

drawframecontrol(dc, &rectradio, dfc_button, ischecked() ? dfcs_buttonradio | dfcs_checked : dfcs_buttonradio); 

i've never been able figure out sure fire way figure out pass rect. i've been using 12x12 rectangle i'de windows tell me size of radio button.

drawframecontrol seems scale radio button fit rect pass have close "right" size of radio looks off other (non-owner drawn) radios on screen.

anyone know how this?

this page shows sizing guidelines controls. note sizes given in both dlu (dialog units) , pixels, depending on whether placing control on dialog or not:

http://msdn.microsoft.com/en-us/library/aa511279.aspx#controlsizing

i thought getsystemmetrics api might return standard size of common controls, didn't find anything. there might common control specific api determine sizing.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -