GpiQueryEditMode: Difference between revisions
Appearance
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..." |
mNo edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ; hps ([[HPS]]) - input: Presentation-space handle. | ||
: Presentation-space handle. | |||
==Return Value== | ==Return Value== | ||
; lMode ([[LONG]]) - returns | ; lMode ([[LONG]]) - returns: Current editing mode. | ||
: Current editing mode. | :: SEGEM_INSERT - Insert mode | ||
: | :: SEGEM_REPLACE - Replace mode | ||
:: SEGEM_ERROR - Error. | |||
: | |||
: | |||
==Remarks== | ==Remarks== | ||
| Line 23: | Line 18: | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError: | Possible returns from WinGetLastError: | ||
; PMERR_INV_HPS (0x207F) | ; PMERR_INV_HPS (0x207F): An invalid presentation-space handle was specified. | ||
: 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_PS_BUSY (0x20F4) | ; PMERR_INV_MICROPS_FUNCTION (0x20A1): An attempt was made to issue a function that is invalid in a micro presentation space. | ||
: 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== | ==Example Code== | ||
This example uses GpiQueryEditMode to return the current editing mode, as set by [[GpiSetEditMode]]. | This example uses GpiQueryEditMode to return the current editing mode, as set by [[GpiSetEditMode]]. | ||
<pre> | <pre> | ||
#define INCL_GPISEGEDITING /* Segment Editing functions */ | #define INCL_GPISEGEDITING /* Segment Editing functions */ | ||
#include | #include <os2.h> | ||
LONG lMode; /* editing mode */ | LONG lMode; /* editing mode */ | ||
Latest revision as of 01:04, 17 November 2025
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
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);