From EDM2
Jump to: navigation, search

GreResetBounds resets the bounds to their initial values, hex 07FFFFF for the minimum coordinates and hex F800000 for the maximum coordinates.

This function must be supported by the presentation driver. GreResetBounds is called by the function GpiResetBoundaryData, and is used to reset the boundary data for a presentation space or device context pair


GreResetBounds(hdc, flOptions, pInstance, lFunction);


hdc (HDC) - input 
Device context handle.
flOptions (ULONG) - input 
Option flags.

Valid flags are:

RB_GPI Reset the GPI bounds 
RB_USER Reset the user bounds 
pInstance (PVOID) - input 
Pointer to instance data.
lFunction (ULONG) - input 
High-order WORD=flags; low-order WORD=NGreResetBounds.


rc (BOOL) - returns  
Return code.

On completion, the handling routine must return a BOOLEAN value to indicate success or an error.

TRUE Successful 
FALSE Error 

Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:



Hardcopy drivers are required to support only GPI bounds. Display drivers must also support user bounds for the Window Manager.

Example Code

#include <os2.h>

HDC      hdc;        /*  Device context handle. */
ULONG    flOptions;  /*  Option flags. */
PVOID    pInstance;  /*  Pointer to instance data. */
ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreResetBounds. */
BOOL     rc;         /*  Return code. */

rc = GreResetBounds(hdc, flOptions, pInstance, lFunction);