GpiQueryGraphicsField: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function returns the bottom-left and top-right corners of the graphics field in presentation page units, as set by the GpiSetGraphicsField function. | |||
This function returns the bottom-left and top-right corners of the graphics field in presentation page units, as set by the GpiSetGraphicsField | |||
function. | |||
==Syntax== | ==Syntax== | ||
GpiQueryGraphicsField(hps, prclField) | |||
==Parameters== | ==Parameters== | ||
; hps (HPS) - input : Presentation-space handle. | ;hps (HPS) - input : Presentation-space handle. | ||
;prclField (PRECTL) - output : Graphics field. | |||
; prclField (PRECTL) - output : Graphics field. | |||
==Return Code== | ==Return Code== | ||
;rc (BOOL) - returns : Success indicator. | |||
; rc (BOOL) - returns : Success indicator. | * TRUE : Successful completion | ||
* FALSE : Error occurred. | |||
===Errors=== | ===Errors=== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
; PMERR_INV_HPS (0x207F) : An invalid presentation-space handle was specified. | ; 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_PS_BUSY (0x20F4) : An attempt was made to access the presentation space from more than one thread simultaneously. | ||
Line 37: | Line 21: | ||
==Example Code== | ==Example Code== | ||
This example uses GpiQueryGraphicsField to return the bottom-left and top-right corners of the graphics field in presentation page units, as | This example uses GpiQueryGraphicsField to return the bottom-left and top-right corners of the graphics field in presentation page units, as set by the GpiSetGraphicsField call, and then assigns the x coordinate of the lower left hand field corner to a variable. | ||
set by the GpiSetGraphicsField call, and then assigns the x coordinate of the lower left hand field corner to a variable. | |||
<pre> | <pre> | ||
#define INCL_GPITRANSFORMS /* Transform functions */ | #define INCL_GPITRANSFORMS /* Transform functions */ |
Revision as of 01:21, 13 June 2019
This function returns the bottom-left and top-right corners of the graphics field in presentation page units, as set by the GpiSetGraphicsField function.
Syntax
GpiQueryGraphicsField(hps, prclField)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- prclField (PRECTL) - output
- Graphics field.
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.
Remarks
Example Code
This example uses GpiQueryGraphicsField to return the bottom-left and top-right corners of the graphics field in presentation page units, as set by the GpiSetGraphicsField call, and then assigns the x coordinate of the lower left hand field corner to a variable.
#define INCL_GPITRANSFORMS /* Transform functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HPS hps; /* Presentation-space handle */ RECTL prclField; /* graphics field */ LONG lLwrLftxCoord; /* lower left x coordinate of field */ fSuccess = GpiQueryGraphicsField(hps, &prclField); /* if successful, assign lower left x coordinate of graphics field */ if (fSuccess == TRUE) lLwrLftxCoord = prclField.xLeft;