gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiSetCharSet (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiSetCharSet(hps, lcid)
HPS hps;      /* presentation-space handle */
LONG lcid;    /* local identifier          */
 
The GpiSetCharSet function sets the current value of the character-set
attribute. The character-set attribute specifies the logical font to use for
drawing character strings. The logical font, specified by the lcid
parameter, must have been previously created using the GpiCreateLogFont
function.
 
If the attribute mode is AM_PRESERVE, the function saves the previous
character set on the attribute stack when it sets the new character set. The
previous character set can be retrieved by using the GpiPop function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
lcid       Specifies the local identifier for a logical font. It can be any
           value in the range 1 through 254 that has been previously set as
           a local identifier for a logical font. If it is zero, the
           function sets the character-set attribute to the default
           character set.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_CHAR_SET_ATTR
     PMERR_INV_HPS
     PMERR_PS_BUSY
 
See Also
 
GpiQueryCharSet, GpiSetAttrMode, GpiSetAttrs, WinGetLastError