cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
ralphster
Active participant

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
Flexera Varaprasad
Flexera

Re: Changing a font not working

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/LangrefCtr...

case DLG_INIT:

hwndDlg = CmdGetHwndDlg(szDialogName);

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

CtrlSetFont (szDialogName, hFont1, 1566);

0 Kudos