Purpose |
Specify the default DDT font and point size. |
Syntax |
DIALOG FONT fontname$, pointsize& |
Remarks |
The DIALOG FONT statement specified the font name and designated font size that will be used for all subsequent dialogs created with DIALOG NEW, until another DIALOG FONT statement is executed. fontname$ must specify the full font name, such as "MS Linedraw". pointsize& is specified in points. The standard point size for a dialog font is 8 point. When a DIALOG NEW statement is executed, the selected default font is associated with it, and its child controls, for the lifetime of the dialog. DIALOG FONT provides a simple mechanism for resolution-based dialog sizing, by adjusting the pointsize& value according to the desktop resolution. Be aware that multi-monitor PC's can report unusual and unexpected resolution ratios, so thorough testing is recommended before employing such a scheme in a distributable application. |
Restrictions |
The DIALOG FONT statement is thread-safe. When specifying a font, care should be exercised to use a standard font that is available in all versions of Windows, such as "Arial", "Courier", "Times New Roman", "MS Sans Serif", etc. Specifying a font name that is not available forces Windows to substitute a font that may or may not be visually appealing, and may also affect the relative size of the dialog to the screen. DIALOG FONT is module-specific. That is, a DIALOG FONT statement only affects subsequent dialogs created by code in the same EXE or DLL as the DIALOG FONT statement appears. For example, a DIALOG FONT statement in a DLL, will not affect dialogs created in the calling EXE or other DLLs loaded by the EXE, etc. If no default dialog font is chosen, PowerBASIC defaults to "MS Sans Serif", 8. |
See also |
|
Example |
DIALOG FONT "Arial",10 |