Simulation support:
This function is mandatory for display drivers that want to be DCAF-enabled.
Description GreGetScreenBits queries a region of screen pixel data and saves it in the memory provided by the caller. The data is compressed, and can be converted into a format suitable for another supported display device. The process will stop when either of the following situations occurs:
The area to be queried can be identified in one of two ways:
The GreGetScreenBits function modifies the supplied rectangle or region to indicate the area that was NOT returned in the call. If the entire requested region was returned, the rectangle or region will be a null area.
The supplied device context must be direct; it is the source of the pixel data. Since this is not a drawing primitive, no correlation, bounds accumulation or drawing will take place.
#define INCL_GRE_SCREEN #include <os2.h> #include <pmddi.h> HDC hdc; /* Any valid, direct (screen) device context handle. */ HRGN hrgnApp; /* Area of the screen to be acquired. */ PBYTE pDest; PULONG pulLength; /* Pointer to a ULONG. */ ULONG flCmd; /* Option flags. */ PDC pdcArg; /* Pointer to instance data. */ ULONG FunN; /* High-order word=Flags; Low-order word=NGreGetScreenBits. */ LONG rc; rc = GreGetScreenBits(hdc, hrgnApp, pDest, pulLength, flCmd, pdcArg, FunN);