LRasterPaint::SetDCExtents

#include "Ltwrappr.h"

L_INT LRasterPaint::SetDCExtents(prcRect)

Sets the boundaries of the device context (DC).

Parameters

const LPRECT prcRect

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

Returns

Value Meaning
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

See Also

Functions

Topics

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; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DigitalPaint C++ Class Library Help