GreCloseFigure

GreCloseFigure closes a figure within a path definition by drawing a line from the current (X,Y) position to the start point of the figure. Upon completion, the current position is the start point of the figure. "Open figures" can be generated by starting a new figure (with a Move function) or by ending the path without first closing the figure. GreCloseFigure is valid outside of a path definition. When this occurs, this function has no effect and the handling routine ignores it. For more information, see "GpiCloseFigure" in the Presentation Manager Programming Reference.

This function can be hooked by the presentation driver.


 * Simulation support: This function is simulated by a handling routine in the graphics engine.

Syntax
GreCloseFigure(hdc, pInstance, lFunction);

Parameters

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


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


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

Return Code

 * rc (BOOL) - returns
 * This function returns BOOLEAN (fSuccess).


 * TRUE
 * Successful
 * FALSE
 * 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_BASE_ERROR
 * PMERR_COORDINATE_OVERFLOW
 * PMERR_DEV_FUNC_NOT_INSTALLED
 * PMERR_HDC_BUSY
 * PMERR_INV_COORD_SPACE
 * PMERR_INV_HDC
 * PMERR_INV_LENGTH_OR_COUNT
 * PMERR_NOT_IN_PATH
 * PMERR_PATH_LIMIT_EXCEEDED


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

Sample Code

 * 1) define INCL_GRE_PATHS
 * 2) include 

HDC     hdc;        /*  Device context handle. */ PVOID   pInstance;  /*  Pointer to instance data. */ ULONG   lFunction;  /*  High-order WORD=flags; low-order WORD=NGreCloseFigure. */ BOOL    rc;         /*  This function returns BOOLEAN (fSuccess). */

rc = GreCloseFigure(hdc, pInstance, lFunction);

