GpiQueryDefViewingLimits: Difference between revisions
Appearance
Created page with "==Description== This function returns the default value of the viewing limits, as set by the GpiSetDefViewingLimits function. ==Syntax== <pre> #define INCL_GPIDEFAULTS /* Or..." |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
This function returns the default value of the viewing limits, as set by the [[GpiSetDefViewingLimits]] function. | |||
This function returns the default value of the viewing limits, as set by the GpiSetDefViewingLimits function. | |||
==Syntax== | ==Syntax== | ||
GpiQueryDefViewingLimits(hps, prclLimits) | |||
==Parameters== | ==Parameters== | ||
; | ;hps (HPS) - input: Presentation-space handle. | ||
;prclLimits (PRECTL) - output: Default viewing limits. | |||
; prclLimits (PRECTL) - output : Default viewing limits. | |||
==Return Code== | ==Return Code== | ||
; | ;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. | |||
==Example Code== | ==Example Code== | ||
This example uses GpiQueryDefViewingLimits to return the default value of the viewing limits, as set by the GpiSetDefViewingLimits and, if the query succeeds, assigns a variable to the x coordinate of the lower left hand corner of the viewing limits rectangle. | This example uses GpiQueryDefViewingLimits to return the default value of the viewing limits, as set by the GpiSetDefViewingLimits and, if the query succeeds, assigns a variable to the x coordinate of the lower left hand corner of the viewing limits rectangle. | ||
<pre> | <pre> | ||
#define INCL_GPIDEFAULTS /* Default functions */ | #define INCL_GPIDEFAULTS /* Default functions */ | ||
Line 51: | Line 36: | ||
</pre> | </pre> | ||
[[Category:Gpi]] | |||
[[Category: |
Latest revision as of 12:24, 26 June 2021
This function returns the default value of the viewing limits, as set by the GpiSetDefViewingLimits function.
Syntax
GpiQueryDefViewingLimits(hps, prclLimits)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- prclLimits (PRECTL) - output
- Default viewing limits.
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.
Example Code
This example uses GpiQueryDefViewingLimits to return the default value of the viewing limits, as set by the GpiSetDefViewingLimits and, if the query succeeds, assigns a variable to the x coordinate of the lower left hand corner of the viewing limits rectangle.
#define INCL_GPIDEFAULTS /* Default functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HPS hps; /* Presentation-space handle */ RECTL prclLimits; /* default viewing limits */ LONG lLwrLftxCoord; /* lower left x coordinate of limit */ fSuccess = GpiQueryDefViewingLimits(hps, &prclLimits); /* if successful, assign lower left x coordinate of viewing limit */ if (fSuccess == TRUE) lLwrLftxCoord = prclLimits.xLeft;