Jump to content

GpiSetCharSet: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
 
Line 5: Line 5:


==Parameters==
==Parameters==
;hps (HPS) - input:Presentation-space handle.
;hps ([[HPS]]) - input:Presentation-space handle.
;llcid (LONG) - input:Character-set local identifier.
;llcid ([[LONG]]) - input:Character-set local identifier.
::LCID_DEFAULT - Default (can be set explicitly with [[GpiSetDefAttrs]]).
::LCID_DEFAULT - Default (can be set explicitly with [[GpiSetDefAttrs]]).
::1-254 - Identifies a logical font.
::1-254 - Identifies a logical font.


==Returns==
==Returns==
;rc (BOOL) - returns:Success indicator.
;rc ([[BOOL]]) - returns:Success indicator.
::TRUE - Successful completion
::TRUE - Successful completion
::FALSE - Error occurred.
::FALSE - Error occurred.
Line 47: Line 47:
GpiSetCharSet(hps, llcid);
GpiSetCharSet(hps, llcid);
</pre>
</pre>
==Related Functions==
* GpiCharString
* GpiCharStringAt
* GpiCharStringPos
* GpiCharStringPosAt
* GpiCreateLogFont
* GpiPop
* GpiQueryCharSet
* GpiQueryCharStringPos
* GpiQueryCharStringPosAt
* GpiSetAttrMode
* GpiSetAttrs
* GpiSetCharAngle
* GpiSetCharBox
* GpiSetCharDirection
* GpiSetCharMode
* GpiSetCharShear
* GpiSetDefAttrs


==Graphic Elements and Orders==
==Graphic Elements and Orders==
Element Type: OCODE_GSCS
;Element Type: OCODE_GSCS
:This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE.
:Order: Set Character Set


This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE.
;Element Type: OCODE_GPSCS
:This element type is generated if the attribute mode is set to AM_PRESERVE.
:Order: Push and Set Character Set


Order: Set Character Set
==Related Functions==
 
* [[GpiCharString]]
Element Type: OCODE_GPSCS
* [[GpiCharStringAt]]
* [[GpiCharStringPos]]
* [[GpiCharStringPosAt]]
* [[GpiCreateLogFont]]
* [[GpiPop]]
* [[GpiQueryCharSet]]
* [[GpiQueryCharStringPos]]
* [[GpiQueryCharStringPosAt]]
* [[GpiSetAttrMode]]
* [[GpiSetAttrs]]
* [[GpiSetCharAngle]]
* [[GpiSetCharBox]]
* [[GpiSetCharDirection]]
* [[GpiSetCharMode]]
* [[GpiSetCharShear]]
* [[GpiSetDefAttrs]]


This element type is generated if the attribute mode is set to AM_PRESERVE.


Order: Push and Set Character Set


[[Category:Gpi]]
[[Category:Gpi]]

Latest revision as of 21:02, 7 April 2025

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

Related Functions