PDA

View Full Version : Applying Fonts to Text



jpskidev
03-03-2005, 10:52 AM
How do you apply fonts to text in static text areas added to existing dialog boxes?

RadhaK
03-04-2005, 04:44 AM
Hi,

You can change the font of text using "CtrlSetFont" function

Below Installshield helpnet article shows the sample

http://helpnet.installshield.com/Robo/BIN/Robo.dll?mgr=agm&tpc=%2Frobo%2Fprojects%2Finstallshield10-5langref%2FLangrefSetFont.htm&wnd=InstallShieldLivingHelp%7CMain&agt=wsm&ctxid=search%2Fgsearch.asp

anitabs
03-07-2005, 05:49 AM
The fonts to text in static text areas can be changed by using other configurable property in windows installer properties.

For more information you can check this link

helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield10-5helplib/IHelpPropReference.htm

PaOnekumar
03-14-2005, 12:51 AM
You can set the font color and style I used the fallowing example.Try this example

/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the SetFont function.
*
* In this script, three different titles are displayed in
* the setup's main window; each title remains on the
* screen for three seconds. The titles are displayed by
* calls to SetTitle, which also sets the type size and
* color. To control the font and font style of the titles,
* the script calls SetFont before each call to SetTitle.
*
* Font Size Style Color
*
* Title 1 Times New Roman 36 Normal Red
* Title 2 Courier New 48 Italic Yellow
* Title 3 Arial 60 Bold, Shadow Blue
*
\*--------------------------------------------------------------*/

// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"

export prototype ExFn_SetFont(HWND);

function ExFn_SetFont(hMSI)
begin

Enable ( BACKGROUND );

// Title 1: Times Roman, 36pt, Normal, Red.
if (SetFont (FONT_TITLE, STYLE_NORMAL, "Times New Roman") < 0) then
MessageBox ("SetFont failed.", SEVERE);
endif;

SetTitle ("SetFont Example 1", 36, RGB(255, 0, 0));
Delay (3);

// Title 2: Courier New, 48pt, Italic, Yellow.
if (SetFont (FONT_TITLE, STYLE_ITALIC, "Courier New") < 0) then
MessageBox ("SetFont failed.", SEVERE);
endif;

SetTitle ("SetFont Example 2", 48, RGB(255, 255, 0));
Delay (3);

// Title 3: Arial, 60pt, Bold, Shadow, Blue.
if (SetFont (FONT_TITLE, STYLE_BOLD | STYLE_SHADOW, "Arial") < 0) then
MessageBox ("SetFont failed.", SEVERE);
endif;

SetTitle ("SetFont Example 3", 60, RGB(0, 0, 255));
Delay (3);

end;

-Pavan Kumar Komaragiri