Jump to content

GpiQueryDefTag: Difference between revisions

From EDM2
Created page with "This function returns the default value of the tag identifier, as set by the GpiSetDefTag function. ==Syntax== GpiQueryDefTag(hps, plTag) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; plTag (PLONG) - output : Default tag identifier. ==Return Value== ; rc (BOOL) - returns : Success indicator. :; TRUE :: Successful completion :; FALSE :: Error occurred. ==Errors== Possible returns from WinGetLastError: ; PMERR_INV_HPS (0x207F) : An inv..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 5: Line 5:


==Parameters==
==Parameters==
; hps ([[HPS]]) - input
; hps ([[HPS]]) - input: Presentation-space handle.
: Presentation-space handle.
; plTag ([[PLONG]]) - output: Default tag identifier.
 
; plTag ([[PLONG]]) - output
: Default tag identifier.


==Return Value==
==Return Value==
; rc ([[BOOL]]) - returns
; rc ([[BOOL]]) - returns: Success indicator.
: Success indicator.
::TRUE - Successful completion
:; TRUE
::FALSE - Error occurred.
:: Successful completion
:; FALSE
:: Error occurred.


==Errors==
==Errors==
Possible returns from WinGetLastError:
Possible returns from WinGetLastError:
; PMERR_INV_HPS (0x207F)
; PMERR_INV_HPS (0x207F): An invalid presentation-space handle was specified.
: 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_PS_BUSY (0x20F4)
; PMERR_INV_MICROPS_FUNCTION (0x20A1): An attempt was made to issue a function that is invalid in a micro presentation space.
: 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.


==Example Code==
==Example Code==
<PRE>
#define INCL_GPIDEFAULTS /* Or use INCL_GPI, INCL_PM, */
#include &lt;os2.h&gt;
HPS  hps;  /* Presentation-space handle. */
PLONG plTag; /* Default tag identifier. */
BOOL  rc;    /* Success indicator. */
rc = GpiQueryDefTag(hps, plTag);
</PRE>
This example uses GpiQueryDefTag to return the default value of the tag identifier, as set by the GpiSetDefTag call.
This example uses GpiQueryDefTag to return the default value of the tag identifier, as set by the GpiSetDefTag call.
<pre>
<pre>
#define INCL_GPIDEFAULTS /* Default functions */
#define INCL_GPIDEFAULTS /* Default functions */
#include &lt;os2.h&gt;
#include <os2.h>


BOOL fSuccess; /* success indicator */
BOOL fSuccess; /* success indicator */
HPS hps; /* Presentation-space handle */
HPS hps;     /* Presentation-space handle */
LONG plTag; /* default tag identifier */
LONG plTag;   /* default tag identifier */


fSuccess = GpiQueryDefTag(hps, &plTag);
fSuccess = GpiQueryDefTag(hps, &plTag);

Latest revision as of 01:12, 17 November 2025

This function returns the default value of the tag identifier, as set by the GpiSetDefTag function.

Syntax

GpiQueryDefTag(hps, plTag)

Parameters

hps (HPS) - input
Presentation-space handle.
plTag (PLONG) - output
Default tag identifier.

Return Value

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.

Example Code

This example uses GpiQueryDefTag to return the default value of the tag identifier, as set by the GpiSetDefTag call.

#define INCL_GPIDEFAULTS /* Default functions */
#include <os2.h>

BOOL fSuccess; /* success indicator */
HPS  hps;      /* Presentation-space handle */
LONG plTag;    /* default tag identifier */

fSuccess = GpiQueryDefTag(hps, &plTag);