Jump to content

GreResetBounds

From EDM2
Revision as of 16:25, 29 August 2017 by Martini (talk | contribs) (Created page with "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 supporte...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Syntax

GreResetBounds(hdc, flOptions, pInstance, lFunction);

Parameters

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.


Returns

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:

PMERR_DEV_FUNC_NOT_INSTALLED 
PMERR_INV_HDC 

Remarks

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

Example Code

#define INCL_GRE_DEVMISC3
#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);