Jump to content

GpiQueryDefArcParams

From EDM2

This function returns the default values of the arc parameters, as set by the GpiSetDefArcParams function.

Syntax

GpiQueryDefArcParams(hps, parcpArcParams)

Parameters

hps (HPS) - input
Presentation-space handle.
parcpArcParams (PARCPARAMS) - output
Default arc parameters.

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.

Example Code

This example uses GpiQueryDefArcParams to return the default values of the arc parameters, as set by the GpiSetDefArcParams call, and assign a variable to the P coefficient if the query succeeds.

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

BOOL      fSuccess;       /* success indicator */
HPS       hps;            /* Presentation-space handle */
ARCPARAMS parcpArcParams; /* Arc parameters */
LONG      lPcoefficient;  /* p coefficient of arc definition */

fSuccess = GpiQueryDefArcParams(hps, &parcpArcParams);

/* if successful, assign value of P coefficient */
if (fSuccess == TRUE)
  lPcoefficient = parcpArcParams.lP;

Related Functions