L_PntSetDCExtents

#include "LtPnt.h"

L_INT EXT_FUNCTION L_PntSetDCExtents(pPaint, prcRect)

pPAINTHANDLE pPaint;

/* pointer to a paint handle */

LPRECT prcRect;

/* pointer to a RECT structure */

Sets the boundaries of the device context (DC).

Parameter

Description

pPaint

Pointer to a paint handle.

prcRect

Pointer to a RECT structure that contains the boundaries of the user DC.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

It is best to set the boundaries of the device context (DC) before calling any functions that use the DC. In addition, the device context boundaries should be updated whenever the old boundaries become invalid, such as when the client area of the window has been resized.

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

See Also

Functions:

L_PntRegionSurface, L_PntRegionBorder, L_PntRegionColor, L_PntFillSurface, L_PntFillBorder, L_PntFillColorReplace, L_PntPickColor, L_PntGetDCExtents

Topics:

DigitalPaint Functions: Getting and Setting the DC Boundaries

 

Setting General DigitalPaint Information

Example

/* This example shows how to set the user DC extents */
pPAINTHANDLE g_pPaint ;

L_VOID OnSize ( HWND hWnd, UINT state, L_INT cxClient, L_INT cyClient )
{
   RECT rcNewRect, rcDCRect ; 
   .
   .
   .

   SetRect ( &rcNewRect, 0, 0, cxClient, cyClient ) ;
  
   /* Do the program sizing stuff */
   L_PntGetDCExtents ( g_pPaint, &rcDCRect ) ;

   if ( ! EqualRect ( &rcNewRect, &rcDCRect ) )
  {
     L_PntSetDCExtents ( g_pPaint, & rcNewRect ) ;
  }
   .
   .
   .
}