#include "LtPnt.h"
L_LTPNT_API L_INT L_PntGetClipRgn(pPaint, phClipRgn)
pPAINTHANDLE pPaint; |
pointer to a paint handle |
L_HRGN* phClipRgn; |
pointer to a Windows region handle |
Gets the current clipping region, set using L_PntSetClipRgn.
Parameter |
Description |
pPaint |
Pointer to a paint handle. |
phClipRgn |
Pointer to a Windows region handle to be updated with the current clipping region. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
The phClipRgn parameter is updated with a windows region, which is a snapshot of the current clipping region, used by the toolkit. The user is responsible for deleting this region.
Required DLLs and Libraries
LTPNT For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
Functions: |
|
Topics: |
|
|
L_INT PntGetClipRgnExample(pPAINTHANDLE pPaint){L_INT nRet;HRGN hRgn, hClipRgn ;/* create some region */hRgn = CreateRectRgn ( 0, 0, 100, 100 ) ;/* Initiate the Paint toolkit */nRet = L_PntInit ( &pPaint );if ( SUCCESS != nRet){return nRet;}/* get the current painting tools clip region */nRet = L_PntGetClipRgn ( pPaint, &hClipRgn) ;if(nRet != SUCCESS)return nRet;/* combine the regions */CombineRgn ( hRgn, hClipRgn, hRgn, RGN_OR ) ;/* set the painting tools new clip region */nRet = L_PntSetClipRgn ( pPaint, hRgn) ;if(nRet != SUCCESS)return nRet;/* delete the regions */DeleteObject ( ( HRGN ) hRgn ) ;DeleteObject ( ( HRGN ) hClipRgn ) ;return SUCCESS;}