This function returns the value of the pick-aperture size, as set by the GpiSetPickApertureSize function.
- hps (HPS)
- Presentation-space handle.
- psizlSize (PSIZEL)
- Pick-aperture size.
- Size of the pick aperture, in presentation-page coordinates.
- rc (BOOL)
- Success indicator.
- TRUE Successful completion
- FALSE Error occurred.
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.
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;