Jump to content

GpiSetDefTag

From EDM2

This function specifies the default value of the primitive tag (see GpiSetTag).

Syntax

GpiSetDefTag(hps, lTag)

Parameters

hps (HPS) - input
Presentation-space handle.
lTag (LONG) - input
Default tag identifier.

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_MICROPS_FUNCTION (0x20A1)
An attempt was made to issue a function that is invalid in a micro presentation space.

Remarks

The primitive tag is reset to its default value at the following times:

The initial default value of the primitive tag, when the presentation space is first created, is 0. The default value can be changed by GpiSetDefTag. Changing the default value has an immediate effect on the current primitive tag, if this is currently set to the default value.

Note: There are restrictions on the use of this function when creating SAA-conforming metafiles; see "MetaFile Resolutions" in the Presentation Manager Programming Reference for more information.

Example Code

#define INCL_GPIDEFAULTS /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>

HPS     hps;   /*  Presentation-space handle. */
LONG    lTag;  /*  Default tag identifier. */
BOOL    rc;    /*  Success indicator. */

rc = GpiSetDefTag(hps, lTag);

This function specifies the default value of the primitive tag (see GpiSetTag).

 
#define INCL_GPIPRIMITIVES
#include <OS2.H>

HPS     hps;    /* Presentation space handle     */

GpiSetDefTag(hps, 1L);

Related Functions