LPaintEffect::PaintRgnDCEffect

#include "ltwrappr.h"

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

L_UINT uEffect;

/* effect to apply when painting */

L_UINT32 uROP3;

/* Windows ROP code for display */

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

Parameter

Description

uEffect

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

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

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTDIS
LTEFX

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:

Class Members

Topics:

Implementing Special Effects

Example

L_VOID TestPaintRgnEfx(HWND hWnd)
{
   LBitmapBase LeadBitmap;
   LBitmapRgn LeadRegion;
   LPaintEffect LeadPaintEffect ;
   HDC hDC ;
   RECT Rect ;

   LeadBitmap.Load(TEXT("image1.cmp")) ;

   Rect.left = 10 ;
   Rect.top = 10 ;
   Rect.right = 50 ;
   Rect.bottom = 50 ;

   LeadRegion.SetBitmap(&LeadBitmap) ;
   LeadRegion.SetRgnRect(&Rect);

   hDC = GetDC(hWnd);
   
   LeadPaintEffect.SetBitmap(&LeadBitmap) ;
   LeadPaintEffect.SetDC(hDC) ;

   LeadPaintEffect.PaintRgnDCEffect(EFX_EFFECT_WIPE_L_TO_R) ;

   LeadPaintEffect.SetDC(0) ;
   ReleaseDC(hWnd,hDC) ;
}