Jump to content

GpiQueryEditMode

From EDM2
Revision as of 22:54, 6 April 2025 by Iturbide (talk | contribs) (Created page with "This function returns the current editing mode, as set by GpiSetEditMode. ==Syntax== GpiQueryEditMode(hps) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ==Return Value== ; lMode (LONG) - returns : Current editing mode. :; SEGEM_INSERT :: Insert mode :; SEGEM_REPLACE :: Replace mode :; SEGEM_ERROR :: Error. ==Remarks== This function can be issued in any drawing mode. ==Errors== Possible returns from WinGetLastError: ; PMERR_INV_HPS (0x2...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function returns the current editing mode, as set by GpiSetEditMode.

Syntax

GpiQueryEditMode(hps)

Parameters

hps (HPS) - input
Presentation-space handle.

Return Value

lMode (LONG) - returns
Current editing mode.
SEGEM_INSERT
Insert mode
SEGEM_REPLACE
Replace mode
SEGEM_ERROR
Error.

Remarks

This function can be issued in any drawing mode.

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_GPISEGEDITING /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>

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

lMode = GpiQueryEditMode(hps);

This example uses GpiQueryEditMode to return the current editing mode, as set by GpiSetEditMode.

#define INCL_GPISEGEDITING /* Segment Editing functions */
#include <os2.h>

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

lMode = GpiQueryEditMode(hps);

Related Functions