LPaintEffect::PaintRgnDCEffect

#include "ltwrappr.h"

virtual L_INT LPaintEffect::PaintRgnDCEffect(uEffect=EFX_EFFECT_NONE, uROP3=SRCCOPY)

Applies an effect when painting the class object's associated bitmap to the class object's associated device context.

Parameters

L_UINT uEffect

Effect to apply when painting. For valid values, refer to Effect Types.

L_UINT32 uROP3

The Windows ROP code that determines how the destination rectangle is updated. This parameter takes the same codes as the Windows BitBlt function. For ordinary painting, use SRCCOPY.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LPaintEffect__PaintRgnDCEffectExample(HWND hWnd) 
{ 
   L_INT nRet; 
   LBitmapBase LeadBitmap; 
   LBitmapRgn LeadRegion; 
   LPaintEffect LeadPaintEffect ; 
   HDC hDC ; 
   RECT Rect ; 
 
   nRet = LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp"))) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   Rect.left = 10 ; 
   Rect.top = 10 ; 
   Rect.right = 50 ; 
   Rect.bottom = 50 ; 
 
   LeadRegion.SetBitmap(&LeadBitmap) ; 
 
   nRet = LeadRegion.SetRgnRect(&Rect); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   hDC = GetDC(hWnd); 
 
   LeadPaintEffect.SetBitmap(&LeadBitmap) ; 
   LeadPaintEffect.SetDC(hDC) ; 
 
   nRet = LeadPaintEffect.PaintRgnDCEffect(EFX_EFFECT_WIPE_L_TO_R) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   LeadPaintEffect.SetDC(0) ; 
   ReleaseDC(hWnd,hDC) ; 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help