## Presentation Device Driver Reference for OS/2

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

### GreSetCodePage - Syntax

Simulation support:

None. This function is mandatory for all drivers.

Description:

GreSetCodePage sets the current code page for characters written with the base (default) font.

This function must be supported by the presentation driver. GreSetCodePage is called by GpiSetCP in response to an application requesting to change the currently selected code page for the device context.

    #define INCL_GRE_DEVMISC3

    #include <os2.h>

    HDC      hdc;        /*  Device context handle. */

    ULONG    lCodePage;  /*  New code page. */

    PVOID    pInstance;  /*  Pointer to instance data. */

    ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreSetCodePage. */

    BOOL     rc;         /*  Return codes. */

    rc = GreSetCodePage(hdc, lCodePage, pInstance,

           lFunction);