Simulation support:
This function is simulated by a handling routine in Revision 2.0 (or later) of the graphics engine.
Description
GreDeviceCreatePalette is called by GreSelectPalette, to process an application's GpiSelectPalette request. The presentation driver is expected to perform any allocation and data structure initialization needed for a subsequent GreDeviceRealizePalette to succeed.
This function can be hooked by the presentation driver.
#define INCL_GRE_PALETTE #include <os2.h> HDC hdc; /* Device context handle. */ PPALETTEINFO ppalinfo; /* Pointer to table of palette data. */ ULONG hdevpal; /* Device palette handle (NULL, if new). */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreDeviceCreatePalette. */ ULONG rc; /* Return codes. */ rc = GreDeviceCreatePalette(hdc, ppalinfo, hdevpal, pInstance, lFunction);