Jump to content

GpiQueryDefArcParams: Difference between revisions

From EDM2
Created page with "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 WinGetLast..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 5: Line 5:


==Parameters==
==Parameters==
; hps ([[HPS]]) - input
; hps ([[HPS]]) - input: Presentation-space handle.
: Presentation-space handle.
; parcpArcParams ([[PARCPARAMS]]) - output: Default arc parameters.
 
; parcpArcParams ([[PARCPARAMS]]) - output
: Default arc parameters.


==Return Value==
==Return Value==
; rc ([[BOOL]]) - returns
; rc ([[BOOL]]) - returns
: Success indicator.
: Success indicator.
:; TRUE
:: TRUE - Successful completion
:: Successful completion
:: FALSE - Error occurred.
:; 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)
: An attempt was made to access the presentation space from more than one thread simultaneously.


==Example Code==
==Example Code==
<PRE>
#define INCL_GPIDEFAULTS /* Or use INCL_GPI, INCL_PM, */
#include &lt;os2.h&gt;
HPS        hps;          /* Presentation-space handle. */
PARCPARAMS  parcpArcParams; /* Default arc parameters. */
BOOL        rc;          /* Success indicator. */
rc = GpiQueryDefArcParams(hps, parcpArcParams);
</PRE>
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.
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.
<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 */
ARCPARAMS parcpArcParams; /* Arc parameters */
ARCPARAMS parcpArcParams; /* Arc parameters */
LONG lPcoefficient; /* p coefficient of arc definition */
LONG     lPcoefficient; /* p coefficient of arc definition */


fSuccess = GpiQueryDefArcParams(hps, &parcpArcParams);
fSuccess = GpiQueryDefArcParams(hps, &parcpArcParams);

Latest revision as of 01:10, 17 November 2025

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