GpiSetCharSet
Appearance
This function sets the current value of the character-set attribute.
Syntax
GpiSetCharSet(hps, llcid)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- llcid (LONG) - input
- Character-set local identifier.
- LCID_DEFAULT - Default (can be set explicitly with GpiSetDefAttrs).
- 1-254 - Identifies a logical font.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE - Successful completion
- FALSE - Error occurred.
Errors
Possible returns from WinGetLastError:
- PMERR_INV_HPS (0x207F)
- An invalid presentation-space handle was specified.
- PMERR_PS_BUSY (0x20F4)
- An attempt was made to access the presentation space from more than one thread simultaneously.
- PMERR_INV_CHAR_SET_ATTR (0x204F)
- An invalid character setid attribute value was specified or the default value was explicitly specified with GpiSetAttrs instead of using the defaults mask. ;PMERR_HUGE_FONTS_NOT_SUPPORTED (0x2035):An attempt was made using GpiSetCharSet, GpiSetPatternSet, GpiSetMarkerSet, or GpiSetAttrs to select a font that is larger than the maximum size (64Kb) supported by the target device driver.
Remarks
This function must not be issued in an area bracket.
The attribute mode (see GpiSetAttrMode) determines whether the current value of the character-set attribute is preserved.
Example Code
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG llcid; /* Character-set local identifier. */ BOOL rc; /* Success indicator. */ rc = GpiSetCharSet(hps, llcid);
This function sets the current value of the character-set attribute.
#define INCL_GPIPRIMITIVES #include <OS2.H> HPS hps; /* Presentation space handle */ LONG llcid = 32L; GpiSetCharSet(hps, llcid);
Graphic Elements and Orders
- Element Type
- OCODE_GSCS
- This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE.
- Order: Set Character Set
- Element Type
- OCODE_GPSCS
- This element type is generated if the attribute mode is set to AM_PRESERVE.
- Order: Push and Set Character Set