cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ralphster
Level 6

Changing a font not working

Hello,

I am trying to change the font on a text area control. The font is not changing though. Can someone take a look at my code below?

 

#define dlgBoxId   225;

HWND hCtrl;

 

hCtrl = GetFont("Arial",17,STYLE_UNDERLINE);
CtrlSetFont(sz,hCtrl,1566);

EzDefineDialog(
"dlgAskCustDetails",
"",
"",
DlgBoxId);

Labels (1)
0 Kudos
(1) Reply
Varaprasad
Level 7 Flexeran
Level 7 Flexeran

Dialog and its controls need to be initialized before font is set. Can you try CtrlSetFont after EzDefineDialog call during dialog initialization (DLG_INIT event) as shown in the below sample.

https://helpnet.flexerasoftware.com/installshield25helplib/Subsystems/LangRef/helplibrary/LangrefCtrlSetFont_example.htm#langref_appendixa_2230407831_1026994

case DLG_INIT:

hwndDlg = CmdGetHwndDlg(szDialogName);

SdGeneralInit(szDialogName, hwndDlg, 0, "");

CtrlSetFont (szDialogName, hFont1, 1566);

0 Kudos