Jump to content

GpiQueryPickAperturePosition: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
 
Line 35: Line 35:


==Related Functions==
==Related Functions==
* [[GpiQueryPickAperturePosition]]
* [[GpiQueryPickApertureSize]]
* [[GpiQueryPickApertureSize]]
* [[GpiSetPickAperturePosition]]
* [[GpiSetPickAperturePosition]]


[[Category:Gpi]]
[[Category:Gpi]]

Latest revision as of 01:11, 13 June 2019

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