Jump to content

GpiQueryMarker: Difference between revisions

From EDM2
Created page with "This function returns the current value of the marker symbol attribute, as set by the GpiSetMarker function. ==Syntax== GpiQueryMarker(hps) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ==Return Value== ; lSymbol (LONG) - returns : Marker symbol. :; MARKSYM_DEFAULT (0L) :: Default :; MARKSYM_CROSS (1L) :: Cross symbol :; MARKSYM_PLUS (2L) :: Plus symbol :; MARKSYM_DIAMOND (3L) :: Diamond symbol :; MARKSYM_SQUARE (4L) :: Square symbol :;..."
 
Ak120 (talk | contribs)
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==
; lSymbol ([[LONG]]) - returns
; lSymbol ([[LONG]]) - returns: Marker symbol.
: Marker symbol.
:: MARKSYM_DEFAULT (0L) : Default
:; MARKSYM_DEFAULT (0L)
:: MARKSYM_CROSS (1L) : Cross symbol
:: Default
:: MARKSYM_PLUS (2L) : Plus symbol
:; MARKSYM_CROSS (1L)
:: MARKSYM_DIAMOND (3L) : Diamond symbol
:: Cross symbol
:: MARKSYM_SQUARE (4L) : Square symbol
:; MARKSYM_PLUS (2L)
:: MARKSYM_SIXPOINTSTAR (5L) : Six-point star symbol
:: Plus symbol
:: MARKSYM_EIGHTPOINTSTAR (6L) : Eight-point star symbol
:; MARKSYM_DIAMOND (3L)
:: MARKSYM_SOLIDDIAMOND (7L) : Solid diamond symbol
:: Diamond symbol
:: MARKSYM_SOLIDSQUARE (8L) : Solid square symbol
:; MARKSYM_SQUARE (4L)
:: MARKERSYM_DOT (9L) : Dot symbol
:: Square symbol
:: MARKSYM_SMALLCIRLCE (10L) : Small Circle symbol
:; MARKSYM_SIXPOINTSTAR (5L)
:: MARKSYM_BLANK (64L) : Blank symbol
:: Six-point star symbol
:: MARKSYM_ERROR (-1L) : Error
:; MARKSYM_EIGHTPOINTSTAR (6L)
:: Eight-point star symbol
:; MARKSYM_SOLIDDIAMOND (7L)
:: Solid diamond symbol
:; MARKSYM_SOLIDSQUARE (8L)
:: Solid square symbol
:; MARKERSYM_DOT (9L)
:: Dot symbol
:; MARKSYM_SMALLCIRLCE (10L)
:: Small Circle symbol
:; MARKSYM_BLANK (64L)
:: Blank symbol
:; MARKSYM_ERROR (-1L)
:: Error


==Remarks==
==Remarks==
Line 43: Line 28:
==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_IN_RETAIN_MODE (0x208C): An attempt was made to issue a function (for example, query) that is invalid when the actual drawing mode is not draw or draw-and-retain.
: An attempt was made to access the presentation space from more than one thread simultaneously.
; PMERR_INV_DC_TYPE (0x2060): An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.
; PMERR_INV_IN_RETAIN_MODE (0x208C)
: An attempt was made to issue a function (for example, query) that is invalid when the actual drawing mode is not draw or draw-and-retain.
; PMERR_INV_DC_TYPE (0x2060)
: An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.


==Example Code==
==Example Code==
<PRE>
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */
#include &lt;os2.h&gt;
HPS    hps;    /* Presentation-space handle. */
LONG    lSymbol; /* Marker symbol. */
lSymbol = GpiQueryMarker(hps);
</PRE>
This example uses GpiQueryMarker to return the current marker symbol attribute after setting the draw mode to DRAW.
This example uses GpiQueryMarker to return the current marker symbol attribute after setting the draw mode to DRAW.
<pre>
<pre>
#define INCL_GPIPRIMITIVES /* Primitive functions */
#define INCL_GPIPRIMITIVES /* Primitive functions */
#define INCL_GPICONTROL /* Control functions */
#define INCL_GPICONTROL /* Control functions */
#include &lt;os2.h&gt;
#include <os2.h>


HPS hps; /* Presentation-space handle */
HPS hps; /* Presentation-space handle */

Latest revision as of 00:30, 24 November 2025

This function returns the current value of the marker symbol attribute, as set by the GpiSetMarker function.

Syntax

GpiQueryMarker(hps)

Parameters

hps (HPS) - input
Presentation-space handle.

Return Value

lSymbol (LONG) - returns
Marker symbol.
MARKSYM_DEFAULT (0L) : Default
MARKSYM_CROSS (1L) : Cross symbol
MARKSYM_PLUS (2L) : Plus symbol
MARKSYM_DIAMOND (3L) : Diamond symbol
MARKSYM_SQUARE (4L) : Square symbol
MARKSYM_SIXPOINTSTAR (5L) : Six-point star symbol
MARKSYM_EIGHTPOINTSTAR (6L) : Eight-point star symbol
MARKSYM_SOLIDDIAMOND (7L) : Solid diamond symbol
MARKSYM_SOLIDSQUARE (8L) : Solid square symbol
MARKERSYM_DOT (9L) : Dot symbol
MARKSYM_SMALLCIRLCE (10L) : Small Circle symbol
MARKSYM_BLANK (64L) : Blank symbol
MARKSYM_ERROR (-1L) : Error

Remarks

This function is invalid when the drawing mode (see GpiSetDrawingMode) is set to retain.

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_IN_RETAIN_MODE (0x208C)
An attempt was made to issue a function (for example, query) that is invalid when the actual drawing mode is not draw or draw-and-retain.
PMERR_INV_DC_TYPE (0x2060)
An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.

Example Code

This example uses GpiQueryMarker to return the current marker symbol attribute after setting the draw mode to DRAW.

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

HPS hps; /* Presentation-space handle */
LONG lSymbol; /* marker symbol */

if (GpiSetDrawingMode(hps, DM_DRAW) == TRUE)
  lSymbol = GpiQueryMarker(hps);

Related Functions