GpiQueryBackMix
Appearance
This function returns the current value of the (character) background color-mixing mode, as set by the GpiSetBackMix function.
Syntax
GpiQueryBackMix(hps)
Parameters
- hps (HPS) - input
- Presentation-space handle.
Returns
- lMixMode (LONG) - returns
- Background mix.
- BM_DEFAULT
- Default
- >0
- Background mix mode
- BM_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 invalid when the drawing mode (see GpiSetDrawingMode) is set to retain.
Example Code
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG lMixMode; /* Background mix. */ lMixMode = GpiQueryBackMix(hps);
This example uses GpiQueryBackMix to return the current value of the (character) background color-mixing mode, as set by the GpiSetBackMix call.
#define INCL_GPIPRIMITIVES /* Primitive functions */ #include <os2.h> LONG lMixMode; /* current background mix (or error) */ HPS hps; /* Presentation-space handle */ lMixMode = GpiQueryBackMix(hps);