There is one font presentation parameter, PP_FONTNAMESIZE, which is used to select the default font for a window. If this presentation parameter is attached to a window, the specified font is automatically selected as the default and is the one used when text-drawing PM functions are called (for example, WinDrawText and GpiCharStringAt).
The format of the font name string is as follows:
<point size>.<face name>(.<modifer>(.<modifier> ...where:
<point size>
Examples are "12.New Times Roman" and "10.Helvetica.Bold.Italic"
Note: Modifiers can be used to create a font with a combination of the listed attributes. Do not use modifiers if a true font of that type is already available. For example, use "10.Helvetica Bold" instead of "10.Helvetica.Bold."
/*******************************************************************/ /* Set the text font for the window */ /*******************************************************************/ szFont = "10.Helvetica Bold Italic"; WinSetPresParam(hwndMain, /* window handle */ PP_FONTNAMESIZE, /* background pres param */ strlen(szFont) + 1, /* length of pres param */ szFont); /* pres param value */