Jump to content

GpiQueryPickApertureSize: Difference between revisions

From EDM2
Created page with "This function returns the value of the pick-aperture size, as set by the GpiSetPickApertureSize function. ==Syntax== <PRE> #define INCL_GPICORRELATION /* Or use INCL_GPI,..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 2: Line 2:


==Syntax==
==Syntax==
<PRE>
GpiQueryPickApertureSize(hps, psizlSize)
#define INCL_GPICORRELATION /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>
 
HPS hps; /* Presentation-space handle. */
PSIZEL psizlSize; /* Pick-aperture size. */
BOOL rc; /* Success indicator. */


rc = GpiQueryPickApertureSize(hps, psizlSize);
</PRE>
==Parameters==
==Parameters==
; hps (HPS): Presentation-space handle.
;hps (HPS): Presentation-space handle.
 
;psizlSize (PSIZEL) : Pick-aperture size.
; psizlSize (PSIZEL) : Pick-aperture size.
:Size of the pick aperture, in presentation-page coordinates.
Size of the pick aperture, in presentation-page coordinates.


==Return Code==
==Return Code==
Line 28: 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_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.
; 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.
==Remarks==


==Example Code==
==Example Code==
Line 44: Line 32:
flResult = GpiQueryPickApertureSize(hps, &sizel);
flResult = GpiQueryPickApertureSize(hps, &sizel);
xcoord = sizel.cx; ycoord = sizel.cy;
xcoord = sizel.cx; ycoord = sizel.cy;
</PRE>


</PRE>
==Related Functions==
==Related Functions==



Revision as of 01:12, 13 June 2019

This function returns the value of the pick-aperture size, as set by the GpiSetPickApertureSize function.

Syntax

GpiQueryPickApertureSize(hps, psizlSize)

Parameters

hps (HPS)
Presentation-space handle.
psizlSize (PSIZEL)
Pick-aperture size.
Size of the pick aperture, in presentation-page coordinates.

Return Code

rc (BOOL)
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 pick-aperture size, as set by the GpiSetPickApertureSize call.

#define INCL_GPICORRELATION
#include <OS2.H>

BOOL flResult;
HPS hps; /* Presentation space handle. */
SIZEL sizel; /* Pick-aperture position. */
LONG xcoord, ycoord;
flResult = GpiQueryPickApertureSize(hps, &sizel);
xcoord = sizel.cx; ycoord = sizel.cy;

Related Functions