LRasterPaint::SetDCExtents

#include "Ltwrappr.h"

L_INT LRasterPaint::SetDCExtents(prcRect)

const LPRECT prcRect;

/* pointer to a RECT structure */

Sets the boundaries of the device context (DC).

Parameter

Description

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 better 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.

Call this function before calling any of the following:

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:

LRasterPaint::RegionSurface, LRasterPaint::RegionBorder, LRasterPaint::RegionColor, LRasterPaint::FillSurface, LRasterPaint::FillBorder, LRasterPaint::FillColorReplace, LRasterPaint::PickColor, LRasterPaint::GetDCExtents, Class Members

Topics:

Setting General DigitalPaint Information

Example

L_INT LRasterPaint_SetDCExtentsExample( CWnd* pWnd, LRasterPaint* pRstp, UINT state, L_INT cxClient, L_INT cyClient )
{
   UNREFERENCED_PARAMETER(pWnd);
   UNREFERENCED_PARAMETER(state);
   L_INT nRet;
   RECT  rcNewRect, rcDCRect ; 
   SetRect ( &rcNewRect, 0, 0, cxClient, cyClient ) ;
   /* Do the program sizing stuff */
   nRet = pRstp->GetDCExtents ( &rcDCRect ) ;
   if(nRet != SUCCESS)
      return nRet;
   if ( ! EqualRect ( &rcNewRect, &rcDCRect ) )
  {
     nRet = pRstp->SetDCExtents ( &rcNewRect ) ;
     if(nRet != SUCCESS)
        return nRet;
  }
   return SUCCESS;
}