GpiSetMarkerSet: Difference between revisions
Created page with "This function sets the current marker-set attribute. ==Syntax== GpiSetMarkerSet(hps, lSet) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; lSet (LONG) - input : Marker-set local identifier. : The identity (lcid) of the required marker set: :; LCID_DEFAULT :: Default (can be set explicitly with GpiSetDefAttrs) :; 1-254 :: Identifies a logical font. ==Return Value== ; rc (BOOL) - returns : Success indicator. :; TRUE :: Successful comp..." |
No edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ; ''hps'' ([[HPS]]) - input | ||
: Presentation-space handle. | : Presentation-space handle. | ||
; lSet ([[LONG]]) - input | ; ''lSet'' ([[LONG]]) - input | ||
: Marker-set local identifier. | : Marker-set local identifier. | ||
: The identity (lcid) of the required marker set: | : The identity (lcid) of the required marker set: | ||
| Line 17: | Line 17: | ||
==Return Value== | ==Return Value== | ||
; rc ([[BOOL]]) - returns | ; ''rc'' ([[BOOL]]) - returns | ||
: Success indicator. | : Success indicator. | ||
:; TRUE | :; TRUE | ||
Latest revision as of 04:33, 20 September 2025
This function sets the current marker-set attribute.
Syntax
GpiSetMarkerSet(hps, lSet)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lSet (LONG) - input
- Marker-set local identifier.
- The identity (lcid) of the required marker set:
- LCID_DEFAULT
- Default (can be set explicitly with GpiSetDefAttrs)
- 1-254
- Identifies a logical font.
Return Value
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
This function must not be issued in an area bracket. The attribute mode (see GpiSetAttrMode) determines whether the current value of the marker-set attribute is preserved. If the default marker set is changed (using GpiSetDefAttrs) the initial default marker set cannot be selected with GpiSetMarkerSet.
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_MARKER_SET_ATTR (0x2099)
- An invalid marker set 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.
Graphic Elements and Orders
Element Type: OCODE_GSMS This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE. Order: Set Marker Set
Element Type: OCODE_GPSMS This element type is generated if the attribute mode is set to AM_PRESERVE. Order: Push and Set Marker Set
Example Code
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG lSet; /* Marker-set local identifier. */ BOOL rc; /* Success indicator. */ rc = GpiSetMarkerSet(hps, lSet);
This function changes the marker set to one defined by the logical font with id 26.
#define INCL_GPIPRIMITIVES #include <OS2.H> HPS hps; /* Presentation-space handle. */ GpiSetMarkerSet(hps, 26L);