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..." |
No edit summary |
||
Line 53: | Line 53: | ||
==Related Functions== | ==Related Functions== | ||
[[Category: | [[Category:Gpi]] |
Revision as of 23:57, 20 January 2017
Description
This function returns the default value of the viewing limits, as set by the GpiSetDefViewingLimits function.
Syntax
#define INCL_GPIDEFAULTS /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ PRECTL prclLimits; /* Default viewing limits. */ BOOL rc; /* Success indicator. */ rc = 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.
Remarks
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;