SetFont(),Example:/*--------------------------------------------------------------------------*\ * * This example illustrates the usage of the SetFont function. * * SetFont is called to change the font and style of the title in the * InstallShield main window. SetFont is called first to set the title * display in 24-point red Helvetica. After a three-second pause, the same * title is displayed in 48-point Terminal font. After another three-second * delay, the title is redisplayed in 72-point Script. * \*--------------------------------------------------------------------------*/ NUMBER nItemID; STRING szFont;program nItemID = FONT_TITLE; szFont = "Helv";/*--------------------------------------------------------------------------*\ * * Set font style to 24-point red Helvetica. * \*--------------------------------------------------------------------------*/ if (SetFont(nItemID, 0, szFont) < 0) then MessageBox("SetFont failed.", SEVERE); endif; SetTitle("SetFont Example 1", 24, RGB(255, 0, 0)); Delay(3); nItemID = FONT_TITLE; szFont = "Terminal";/*--------------------------------------------------------------------------*\ * * Set font style to 48-point yellow Terminal. * \*--------------------------------------------------------------------------*/ if (SetFont(nItemID, 0, szFont) < 0) then MessageBox("SetFont failed.", SEVERE); endif; SetTitle("SetFont Example 2", 48, RGB(255, 0, 0)); Delay(3); nItemID = FONT_TITLE; szFont = "Script";/*--------------------------------------------------------------------------*\ * * Set font style to 72-point black Script. * \*--------------------------------------------------------------------------*/ if (SetFont(nItemID, 0, szFont) < 0) then MessageBox("SetFont failed.", SEVERE); endif; SetTitle("SetFont Example 3", 72, RGB(255, 0, 0)); Delay(3);endprogram// Source file: Is5fn166.rul
to LegerWu(Leger):setfont()好像是设置显示字体的吧?拷贝windows确实会自己进行注册,但是用程序拷贝进去的字体并没有自动注册
*
* This example illustrates the usage of the SetFont function.
*
* SetFont is called to change the font and style of the title in the
* InstallShield main window. SetFont is called first to set the title
* display in 24-point red Helvetica. After a three-second pause, the same
* title is displayed in 48-point Terminal font. After another three-second
* delay, the title is redisplayed in 72-point Script. *
\*--------------------------------------------------------------------------*/ NUMBER nItemID;
STRING szFont;program nItemID = FONT_TITLE;
szFont = "Helv";/*--------------------------------------------------------------------------*\
*
* Set font style to 24-point red Helvetica.
*
\*--------------------------------------------------------------------------*/ if (SetFont(nItemID, 0, szFont) < 0) then
MessageBox("SetFont failed.", SEVERE); endif; SetTitle("SetFont Example 1", 24, RGB(255, 0, 0));
Delay(3); nItemID = FONT_TITLE;
szFont = "Terminal";/*--------------------------------------------------------------------------*\
*
* Set font style to 48-point yellow Terminal.
*
\*--------------------------------------------------------------------------*/ if (SetFont(nItemID, 0, szFont) < 0) then
MessageBox("SetFont failed.", SEVERE);
endif; SetTitle("SetFont Example 2", 48, RGB(255, 0, 0)); Delay(3); nItemID = FONT_TITLE;
szFont = "Script";/*--------------------------------------------------------------------------*\
*
* Set font style to 72-point black Script.
*
\*--------------------------------------------------------------------------*/ if (SetFont(nItemID, 0, szFont) < 0) then
MessageBox("SetFont failed.", SEVERE);
endif; SetTitle("SetFont Example 3", 72, RGB(255, 0, 0));
Delay(3);endprogram// Source file: Is5fn166.rul