This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Changing a font not working
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 19, 2019
02:39 PM
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);
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 19, 2019
11:38 PM
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.
case DLG_INIT:
hwndDlg = CmdGetHwndDlg(szDialogName);
SdGeneralInit(szDialogName, hwndDlg, 0, "");
CtrlSetFont (szDialogName, hFont1, 1566);