Compartilhar via


Fonts and Text Sizes

4/19/2010

Selecting the most suitable font and text sizes for your user interface (UI) contributes greatly to the quality and usability of the application.

Use Controls for a Consistent UI

Avoid hard-coding font sizes for controls such as ListView, TreeView, ListBox, and RichEdit. The user can select a default text size by using the Screen command in Control Panel.

Query for the user-selected default text size using the SHGetUIMetrics function, and then set the fonts in the application to that size, creating a consistent experience. Check the default text size when the application starts and when the user changes the default size. The application can detect when the user changes the default font setting by listening for the SH_UIMETRIC_CHANGE notification.

Use static font sizes for dialog controls. Controls such as RadioButton, Label, TextBox, and CheckBox should have a fixed size that does not change with the device default text size setting.