GreSetPel

GreSetPel sets a pel to the current line attribute, color, and mix.

This function must be supported by the presentation driver. GreSetPel is called by the function GpiSetPel, and is used to set the value of a pel at a specified (X,Y) coordinate within a device context. This function can be handled by bit map-simulation.


 * Simulation support: None. This function is mandatory for all drivers.

Syntax
GreSetPel(hdc, pptlPel, pInstance, lFunction);

Parameters

 * hdc (HDC) - input : Device context handle.


 * pptlPel (PPOINTL) - input : Pointer.

Pointer to pel position in world or screen coordinates.


 * pInstance (PVOID) - input : Pointer to instance data.


 * lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreSetPel.

Returns

 * rc (LONG) - returns : Return codes.

On completion, the handling routine must return a LONG integer (cHits) indicating, where appropriate, whether correlation hits were detected:


 * GPI_OK Successful
 * GPI_HITS Successful with correlate hit (returned by the display driver when the correlate flag is ON, and a hit is detected)
 * GPI_ERROR Error

Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:


 * PMERR_BITMAP_NOT_SELECTED
 * PMERR_COORDINATE_OVERFLOW
 * PMERR_DEV_FUNC_NOT_INSTALLED
 * PMERR_HDC_BUSY
 * PMERR_INV_COLOR_DATA
 * PMERR_INV_COLOR_INDEX
 * PMERR_INV_COORD_SPACE
 * PMERR_INV_COORDINATE
 * PMERR_INV_HDC
 * PMERR_INV_IN_AREA
 * PMERR_INV_IN_PATH
 * PMERR_INV_LENGTH_OR_COUNT
 * PMERR_INV_PICK_APERTURE_POSN
 * PMERR_INV_RECT

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Sample

 * 1) define INCL_GRE_BITMAPS
 * 2) include 

HDC       hdc;        /*  Device context handle. */ PPOINTL   pptlPel;    /*  Pointer. */ PVOID     pInstance;  /*  Pointer to instance data. */ ULONG     lFunction;  /*  High-order WORD=flags; low-order WORD=NGreSetPel. */ LONG      rc;         /*  Return codes. */

rc = GreSetPel(hdc, pptlPel, pInstance, lFunction);

Remarks
If COM_TRANSFORM is set, the pel position is expected in world coordinates. If COM_TRANSFORM is not set, the pel position is expected in screen coordinates. This function is subject to all usual clipping. No error is returned when the point is clipped.