## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreOpenScreenChangeArea - Remarks

It is permissible to implement this function by returning 0 (zero) to indicate that the bits were not saved and, therefore, must be saved by the calling routine.

If EnterDriver is successful, GreOpenScreenChangeArea attempts to create a new SCA instance by calling AllocateMemory, a common routine in MEMMAN.C. The new SCA gets initialized to NULL and is added to the SCA linked list.

If the creation is successful and this is the first SCA to be opened, GreSetProcessControl is used to tell the graphics engine to turn on the COM _SCR_BOUND flag and start accumulating screen bounds. Setting this bit causes subsequent screen drawing functions to accumulate the clipped bounds into the active SCAs.

If there is not enough memory to create the SCA, PMERR_MEMORY_ALLOCATION_ ERROR is logged and GPI_ERROR is returned.

Before returning either the handle of the new SCA or GPI_ERROR, ExitDriver is called.