Jump to content

GpiQueryDrawingMode

From EDM2

This function returns the current drawing mode, as set by GpiSetDrawingMode.

Syntax

GpiQueryDrawingMode(hps)

Parameters

hps (HPS) - input
Presentation-space handle.

Return Value

lMode (LONG) - returns
Drawing mode.
(See GpiSetDrawingMode for details):
>0
Drawing mode
DM_ERROR
Error.

Remarks

This function retrieves the current drawing mode of the presentation space.

Errors

Possible returns from WinGetLastError:

PMERR_INV_HPS (0x207F)
An invalid presentation-space handle was specified.
PMERR_PS_BUSY (0x20F4)
An attempt was made to access the presentation space from more than one thread simultaneously.
PMERR_INV_MICROPS_FUNCTION (0x20A1)
An attempt was made to issue a function that is invalid in a micro presentation space.

Example Code

#define INCL_GPICONTROL /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>

HPS  hps;   /* Presentation-space handle. */
LONG lMode; /* Drawing mode. */

lMode = GpiQueryDrawingMode(hps);

This example uses GpiQueryDrawingMode to return the current drawing mode, as set by GpiSetDrawingMode.

#define INCL_GPICONTROL /* Control functions */
#include <os2.h>

LONG lMode; /* drawing mode */
HPS hps; /* Presentation-space handle */

lMode = GpiQueryDrawingMode(hps);

Related Functions