GpiQueryCharDirection: Difference between revisions
Appearance
Created page with "This function returns the current value of the character-direction attribute, as set by the GpiSetCharDirection function. ==Syntax== GpiQueryCharDirection(hps, pDirection) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; pDirection (PLONG) - output : Character-direction attribute value. ==Return Value== ; rc (BOOL) - returns : Success indicator. :; TRUE :: Successful completion :; FALSE :: Error occurred. ==Remarks== This function i..." |
mNo edit summary |
||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ; hps ([[HPS]]) - input: Presentation-space handle. | ||
: Presentation-space handle. | ; pDirection ([[PLONG]]) - output: Character-direction attribute value. | ||
; pDirection ([[PLONG]]) - output | |||
: Character-direction attribute value. | |||
==Return Value== | ==Return Value== | ||
; rc ([[BOOL]]) - returns | ; rc ([[BOOL]]) - returns: Success indicator. | ||
: Success indicator. | :: TRUE - Successful completion | ||
: | :: FALSE - Error occurred. | ||
: | |||
==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_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. | |||
==Example Code== | ==Example Code== | ||
This example uses GpiQueryCharDirection to return the current value of the character-direction attribute, as set by the GpiSetCharDirection call. | This example uses GpiQueryCharDirection to return the current value of the character-direction attribute, as set by the GpiSetCharDirection call. | ||
<pre> | <pre> | ||
#define INCL_GPIPRIMITIVES /* Primitive functions */ | #define INCL_GPIPRIMITIVES /* Primitive functions */ | ||
#include | #include <os2.h> | ||
BOOL fSuccess; /* success indicator */ | BOOL fSuccess; /* success indicator */ | ||
| Line 55: | Line 34: | ||
fSuccess = GpiQueryCharDirection(hps, &lDirection); | fSuccess = GpiQueryCharDirection(hps, &lDirection); | ||
</pre> | </pre> | ||
[[Category:Gpi]] | [[Category:Gpi]] | ||
Latest revision as of 23:41, 16 November 2025
This function returns the current value of the character-direction attribute, as set by the GpiSetCharDirection function.
Syntax
GpiQueryCharDirection(hps, pDirection)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- pDirection (PLONG) - output
- Character-direction attribute value.
Return Value
- rc (BOOL) - returns
- Success indicator.
- TRUE - Successful completion
- FALSE - Error occurred.
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.
Example Code
This example uses GpiQueryCharDirection to return the current value of the character-direction attribute, as set by the GpiSetCharDirection call.
#define INCL_GPIPRIMITIVES /* Primitive functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HPS hps; /* Presentation-space handle */ LONG lDirection; /* Character-direction attribute value*/ fSuccess = GpiQueryCharDirection(hps, &lDirection);