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.
GpiSetCharMode (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPRIMITIVES
BOOL GpiSetCharMode(hps, flMode)
HPS hps; /* presentation-space handle */
LONG flMode; /* character mode */
The GpiSetCharMode function sets the character mode. The character mode
specifies which character attributes to use when drawing characters.
If the attribute mode is AM_PRESERVE, the function saves the previous
character mode on the attribute stack when it sets the new mode. The
previous character mode can be retrieved by using the GpiPop function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
flMode Specifies the character mode. It can be one of the following
values:
Value Meaning
─────────────────────────────────────────────────────────────────
CM_DEFAULT Use the default.
CM_MODE1 Use an image font, as determined by the character-set
attribute. The positioning of characters is
influenced only by the character-direction attribute;
other character attributes are ignored.
CM_MODE2 Use an image font, as determined by the character-set
attribute. The character box, character angle,
character direction, character shear, character
spacing, character extra, and character break extra
values are taken into consideration for positioning
successive characters. Individual character
definitions are not scaled or rotated.
CM_MODE3 Use a vector font, as determined by the character-set
attribute. All character attributes are followed
exactly for positioning individual characters,
scaling, rotating, and shearing.
If the specified mode is not valid, the default is used.
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_MODE_ATTR
PMERR_INV_HPS
PMERR_PS_BUSY
See Also
GpiQueryAttrMode, GpiSetAttrMode, WinGetLastError
♦