Jump to content

GpiSetPickAperturePosition: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 19: Line 19:
;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.
;PMERR_INV_COORDINATE (0x205B) : An invalid coordinate value was specified.
;PMERR_INV_COORDINATE (0x205B) : An invalid coordinate value was specified.
==Remarks==


==Example Code==
==Example Code==
Line 29: Line 27:


BOOL flResult;
BOOL flResult;
HPS hps;                         /* Presentation space handle. */
HPS hps;                         /* Presentation space handle. */
POINTL ptlPoint = {50L, 50L};     /* Pick-aperture position. */
POINTL ptlPoint = {50L, 50L};   /* Pick-aperture position. */


flResult = GpiSetPickAperturePosition(hps, &ptlPoint);
flResult = GpiSetPickAperturePosition(hps, &ptlPoint);

Latest revision as of 06:56, 14 February 2020

This function sets the center of the pick aperture, in presentation page space, for subsequent nonretained correlation operations.

Syntax

GpiSetPickAperturePosition(hps, pptlPick)

Parameters

hps (HPS) - input
Presentation-space handle.
pptlPick (PPOINTL) - input
Center of the pick aperture.
The center is in presentation page coordinates.

Return Code

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_COORDINATE (0x205B)
An invalid coordinate value was specified.

Example Code

In this example we query the position of the center of the pick aperture.

#define INCL_GPICORELATION
#include <OS2.H>

BOOL flResult;
HPS hps;                         /* Presentation space handle. */
POINTL ptlPoint = {50L, 50L};    /* Pick-aperture position. */

flResult = GpiSetPickAperturePosition(hps, &ptlPoint);

Related Functions