Jump to content

GpiQueryCharSet: Difference between revisions

From EDM2
Created page with "GpiQueryCharSet - Syntax This function returns the character-set local identifier (lcid), as set by the GpiSetCharSet function. ==Syntax== GpiQueryCharSet(hps) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ==Return Value== ; lLcid (LONG) - returns : Character-set local identifier. :; LCID_DEFAULT :: Default :; >0 :: Local identifier :; LCID_ERROR :: Error. ==Remarks== This function is invalid when the drawing mode (see GpiSetDrawingMo..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GpiQueryCharSet - Syntax
This function returns the character-set local identifier (lcid), as set by the [[GpiSetCharSet]] function.
This function returns the character-set local identifier (lcid), as set by the [[GpiSetCharSet]] function.


Line 6: Line 5:


==Parameters==
==Parameters==
; hps ([[HPS]]) - input
; hps ([[HPS]]) - input: Presentation-space handle.
: Presentation-space handle.


==Return Value==
==Return Value==
; lLcid ([[LONG]]) - returns
; lLcid ([[LONG]]) - returns: Character-set local identifier.
: Character-set local identifier.
:: LCID_DEFAULT - Default
:; LCID_DEFAULT
:: >0 - Local identifier
:: Default
:: LCID_ERROR - Error.
:; >0
:: Local identifier
:; LCID_ERROR
:: Error.


==Remarks==
==Remarks==
Line 24: 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_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    lLcid; /* Character-set local identifier. */
lLcid = GpiQueryCharSet(hps);
</PRE>
This example uses GpiQueryCharSet to return the character-set local identifier (lcid), as set by the GpiSetCharSet call.
This example uses GpiQueryCharSet to return the character-set local identifier (lcid), as set by the GpiSetCharSet call.
<pre>
<pre>
#define INCL_GPIPRIMITIVES /* Primitive functions */
#define INCL_GPIPRIMITIVES /* Primitive functions */
#include &lt;os2.h&gt;
#include <os2.h>


LONG lLcid; /* character set lcid (or error) */
LONG lLcid; /* character set lcid (or error) */

Latest revision as of 19:48, 17 November 2025

This function returns the character-set local identifier (lcid), as set by the GpiSetCharSet function.

Syntax

GpiQueryCharSet(hps)

Parameters

hps (HPS) - input
Presentation-space handle.

Return Value

lLcid (LONG) - returns
Character-set local identifier.
LCID_DEFAULT - Default
>0 - Local identifier
LCID_ERROR - 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 GpiQueryCharSet to return the character-set local identifier (lcid), as set by the GpiSetCharSet call.

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

LONG lLcid; /* character set lcid (or error) */
HPS hps; /* Presentation-space handle */

lLcid = GpiQueryCharSet(hps);

Related Functions