Jump to content

GpiQueryCharExtra: Difference between revisions

From EDM2
Created page with "This function returns the current value of the character-extra attribute, as set by the GpiSetCharExtra function. ==Syntax== GpiQueryCharExtra(hps, Extra) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; Extra (PFIXED) - output : Character-extra attribute value. ==Return Value== ; rc (BOOL) - returns : Success indicator. :; TRUE :: Successful completion :; FALSE :: Error occurred. ==Remarks== This function is invalid when the drawin..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 5: Line 5:


==Parameters==
==Parameters==
; hps ([[HPS]]) - input
; hps ([[HPS]]) - input: Presentation-space handle.
: Presentation-space handle.
; Extra ([[PFIXED]]) - output: Character-extra attribute value.
 
; Extra ([[PFIXED]]) - output
: Character-extra attribute value.


==Return Value==
==Return Value==
; rc ([[BOOL]]) - returns
; rc ([[BOOL]]) - returns: Success indicator.
: Success indicator.
:; TRUE
:; TRUE
:: Successful completion
:: Successful completion
Line 32: Line 28:


==Example Code==
==Example Code==
<PRE>
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */
#include &lt;os2.h&gt;
HPS    hps;  /* Presentation-space handle. */
PFIXED  Extra; /* Character-extra attribute value. */
BOOL    rc;    /* Success indicator. */
rc = GpiQueryCharExtra(hps, Extra);
</PRE>
This example uses GpiQueryCharExtra to return the current value of the character-extra attribute, as set by the GpiSetCharExtra call.
This example uses GpiQueryCharExtra to return the current value of the character-extra attribute, as set by the GpiSetCharExtra call.
<pre>
<pre>
#define INCL_GPIPRIMITIVES /* Primitive functions */
#define INCL_GPIPRIMITIVES /* Primitive 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 */
FIXED pfxExtra; /* Character-extra attribute value */
FIXED pfxExtra; /* Character-extra attribute value */



Latest revision as of 23:45, 16 November 2025

This function returns the current value of the character-extra attribute, as set by the GpiSetCharExtra function.

Syntax

GpiQueryCharExtra(hps, Extra)

Parameters

hps (HPS) - input
Presentation-space handle.
Extra (PFIXED) - output
Character-extra attribute value.

Return Value

rc (BOOL) - returns
Success indicator.
TRUE
Successful completion
FALSE
Error occurred.

Remarks

This function is invalid when the drawing mode (see GpiSetDrawingMode) is set to retain.

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_IN_RETAIN_MODE (0x208C)
An attempt was made to issue a function (for example, query) that is invalid when the actual drawing mode is not draw or draw-and-retain.

Example Code

This example uses GpiQueryCharExtra to return the current value of the character-extra attribute, as set by the GpiSetCharExtra call.

#define INCL_GPIPRIMITIVES /* Primitive functions */
#include <os2.h>

BOOL fSuccess;  /* success indicator */
HPS hps;        /* Presentation-space handle */
FIXED pfxExtra; /* Character-extra attribute value */

fSuccess = GpiQueryCharExtra(hps, &pfxExtra);