GpiQueryPatternSet: Difference between revisions
Appearance
Created page with "This function returns the current value of the pattern-set identifier, as set by the GpiSetPatternSet function. ==Syntax== <PRE> #define INCL_GPIPRIMITIVES /* Or use INCL_GPI..." |
mNo edit summary |
||
Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
GpiQueryPatternSet (hps) | |||
==Parameters== | ==Parameters== | ||
; hps (HPS) - input : Presentation-space handle. | ; hps (HPS) - input : Presentation-space handle. | ||
==Return Code== | ==Return Code== | ||
Line 21: | Line 13: | ||
* LCID_ERROR Error. | * LCID_ERROR Error. | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
; PMERR_INV_HPS (0x207F) : An invalid presentation-space handle was specified. | ; 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_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_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. | ; 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. | ||
==Remarks== | ==Remarks== | ||
Line 35: | Line 27: | ||
<PRE> | <PRE> | ||
#define INCL_GPIPRIMITIVES | #define INCL_GPIPRIMITIVES | ||
#include < | #include <os2.h> | ||
LONG lpatternset; | LONG lpatternset; | ||
Line 44: | Line 36: | ||
==Related Functions== | ==Related Functions== | ||
*GpiSetPatternSet | |||
[[Category:Gpi]] | [[Category:Gpi]] |
Revision as of 16:50, 4 March 2017
This function returns the current value of the pattern-set identifier, as set by the GpiSetPatternSet function.
Syntax
GpiQueryPatternSet (hps)
Parameters
- hps (HPS) - input
- Presentation-space handle.
Return Code
- lSet (LONG) - returns
- Pattern-set local identifier.
- LCID_DEFAULT Default
- >0 Pattern set
- LCID_ERROR Error.
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.
Remarks
This function is not valid when the drawing mode (see GpiSetDrawingMode) is set to retain.
Example Code
In this example we query the pattern set identifier, which is set by the GpiSetPatternSet.
#define INCL_GPIPRIMITIVES #include <os2.h> LONG lpatternset; HPS hps; /* Presentation space handle. */ lpatternset = GpiQueryPatternSet(hps);
Related Functions
- GpiSetPatternSet