DialogSetFont

InstallShield 2014 » InstallScript Language Reference

The DialogSetFont function sets the font for InstallScript dialogs that are displayed at run time. This function affects built-in InstallScript dialogs and custom InstallScript dialogs (that is, dialogs that are defined through EzDefineDialog or DefineDialog). This function does not affect dialogs that are displayed by calling the Windows API function MessageBox, which are displayed in the font specified by the user for message boxes (specified using the Windows Control panel). This function does not affect the text in the title bar of any dialog; the font of dialog title bars is set by Windows.

Syntax

DialogSetFont (szFontName, nFontSize, nReserved);

Parameters

DialogSetFont Parameters

Parameter

Description

szFontName

Specifies the font to be used—for example, “Times New Roman”.

nFontSize

Specifies the font size—for example, 10.

nReserved

Pass 0 (zero) in this parameter. No other value is allowed.

Return Values

DialogSetFont always returns 0 (zero). If the function cannot change the font, dialog text is displayed in the system font.

Additional Information

When changing the font of InstallShield dialogs, use a font that you know is available on any system that the setup is running on. Also, be sure to test the setup on a variety of screen resolutions to ensure that the font works correctly.