Jump to content

GpiQueryPickAperturePosition

From EDM2
Revision as of 22:44, 9 September 2018 by Ak120 (talk | contribs)

This function returns the position of the centre of the pick aperture.

Syntax

GpiQueryPickAperturePosition(hps, pptlPoint);

Parameters

hps (HPS) - input
Presentation-space handle.
pptlPoint (PPOINTL) - output
Pick-aperture position.
Position of the centre of the pick aperture, 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_DC_TYPE (0x2060)
An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.

Example Code

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

#define INCL_GPICORELATION
#include <OS2.H>

BOOL flResult;
HPS hps; /* Presentation space handle. */
POINTL ptlRefPoint; /* Pick-aperture position. */
LONG xcoord, ycoord;
flResult = GpiPickAperturePosition(hps, &ptlRefPoint);
xcoord = ptlRefPoint.x; ycoord = ptlRefPoint.y;

Related Functions