Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac!att!ucbvax!bcrvmpc3.vnet.ibm.com!klos From: klos@bcrvmpc3.vnet.ibm.com (Marty Klos 407/443-5411, TL 443) Newsgroups: comp.os.os2.programmer Subject: Re: Changing fonts in dialog boxes Message-ID: <9105151525.AA14905@ucbvax.Berkeley.EDU> Date: 15 May 91 15:18:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 34 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.