RC File Standards

From ReactOS Wiki
Revision as of 06:50, 6 May 2015 by Alvinhochun (talk | contribs) (Add info regarding Chinese)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To keep some sort of a standard in resource files and to support the Windows 2000+ look, we need to follow some rules:

1. Always use a DIALOGEX template instead of a DIALOG template.

2. Set the DS_SHELLFONT flag in your dialog STYLEs instead of DS_FIXEDSYS and/or DS_SETFONT.

It would be visually jarring for there to be a mix of fonts on a property sheet. You wouldn't want the "Advanced" button to be in MS Sans Serif but the "Apply" button in Tahoma. To avoid this problem, the property sheet manager looks at all the pages in the property sheet. If they are all using the "Windows 2000" look, then the property sheet uses the "Windows 2000" look also. But if there is even a single page that does not use the "Windows 2000" look, then the property sheet reverts to the "classic" look and also converts all the "Windows 2000"-look pages to "classic" look.

3. Set the dialog font to "MS Shell Dlg".

4. Use the dialog font "MS UI Gothic" for Japanese.

On Windows 9x, both of the logical fonts map to code page-based bitmap fonts. MS Shell Dlg generally maps to a code page-specific version of MS Sans Serif. MS Shell Dlg 2 maps to a code page-specific bitmap Tahoma font. On Windows NT 4.0+ both of the logical fonts map to Unicode-based TrueType fonts. MS Shell Dlg uses Microsoft Sans Serif for Latin, Greek, Cyrillic, Arabic, Hebrew, and Thai characters; MS UI Gothic for Japanese; Gulim for Korean; Simsun for Simplified Chinese; PMinglu for Traditional Chinese; etc. On Windows 2000 and later: MS Shell Dlg 2 maps to Tahoma, which is the default font used throughout the operating system. An application that runs only on this operating system can specify DS_SHELLFONT with MS Shell Dlg 2 to map to Tahoma. However, an application that also runs on Windows NT 4.0, Windows 95, Windows 98, or Windows Me should specify DS_SHELLFONT with MS Shell Dlg instead of MS Shell Dlg 2. Characters that are not implemented in Tahoma are available through font linking. The main advantage of Tahoma over Microsoft Sans Serif is that Tahoma has a native bold font face. Its main disadvantage is that older operating systems might not have it installed, and might substitute a less attractive font.
On Windows XP, the font entry for Traditional Chinese is using the Chinese localized name "新細明體". (Full entry is FONT 9, "新細明體", FW_NORMAL, FALSE, 136.) Same for Simplified Chinese which uses "宋体". However, this cannot be used currently as-is, since we do not currently use localized font name (CORE-9638) and font linking is not implemented yet. See CORE-9566

5. Use font size 8 for Latin, Greek, Cyrillic, Arabic, Hebrew, and Thai.

6. Use font size 9 for Japanese, Chinese and Korean.

7. Don't use DS_3DLOOK It is outdated and not of any use.

8. Use the extended style WS_EX_LAYOUTRTL for languages that are Right-to-Left oriented, such as Hebrew and Arabic.