Jump to content

GpiQueryCharBreakExtra

From EDM2
Revision as of 21:39, 6 April 2025 by Iturbide (talk | contribs) (Created page with "This function returns the current value of the character-break-extra attribute, as set by the GpiSetCharBreakExtra function. ==Syntax== GpiQueryCharBreakExtra(hps, BreakExtra) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; BreakExtra (PFIXED) - output : Character-break-extra attribute value. ==Return Value== ; rc (BOOL) - returns : Success indicator. :; TRUE :: Successful completion :; FALSE :: Error occurred. ==Remarks== This fun...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Syntax

GpiQueryCharBreakExtra(hps, BreakExtra)

Parameters

hps (HPS) - input
Presentation-space handle.
BreakExtra (PFIXED) - output
Character-break-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

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

HPS     hps;        /* Presentation-space handle. */
PFIXED  BreakExtra; /* Character-break-extra attribute value. */
BOOL    rc;         /* Success indicator. */

rc = GpiQueryCharBreakExtra(hps, BreakExtra);

This example uses GpiQueryCharBreakExtra to return the current value of the character-break-extra attribute, as set by the GpiSetCharBreakExtra call.

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

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

fSuccess = GpiQueryCharBreakExtra(hps, &pfxBreakExtra);