🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
1 messages
1 total messages Started by Marty Klos 407/443-5411, TL 443 Wed, 15 May 1991 15:18
Re: Changing fonts in dialog boxes
#2626
Author: Marty Klos 407/443-5411, TL 443
Date: Wed, 15 May 1991 15:18
34 lines
1866 bytes
From article <1991May13.210053.13978@netcom.COM>, by edg@netcom.COM (Ed Greenber
> I am trying to create a dialog box, and have the fonts inside two
> controls be something other than the default font.
>
> My controls look like this:
>
>        CONTROL "Text", ID_CALLSIGN, 5, 52, 94, 21, WC_STATIC, SS_TEXT |
>                DT_LEFT | DT_TOP | WS_GROUP | WS_VISIBLE
>         CONTROL "", ID_NAMEADDRESS, 107, 47, 114, 27, WC_MLE, MLS_BORDER |
>                 WS_GROUP | WS_TABSTOP | WS_VISIBLE
>
> Can anyone suggest how to tell the Dialog box to display different
> fonts?

I use the PRESPARAMS statement.  For example, to change the font of a
*previous* CONTROL to 8 point Helvetica, use the following
PRESPARAMS statement:

   CONTROL "Text", ID_CALLSIGN, 5, 52, 94, 21, WC_STATIC, SS_TEXT |
           DT_LEFT | DT_TOP | WS_GROUP | WS_VISIBLE
   CONTROL "", ID_NAMEADDRESS, 107, 47, 114, 27, WC_MLE, MLS_BORDER |
           WS_GROUP | WS_TABSTOP | WS_VISIBLE
   PRESPARAMS PP_FONTNAMESIZE "8.Helv"

This will change the font for the ID_NAMEADDRESS control but not
for the ID_CALLSIGN control.  Also, subsequent controls will *not*
have this new font.

There are other presentation parameters and they are defined in
the file pmwin.h.

Marty Klos                           | Disclaimer: The statements above
IBM, Boca Raton, FL                  | are my own and not necessarily
Internet: klos@bcrvmpc3.vnet.ibm.com | those of my employer.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads