LBitmapWindow::IsPaintActive

#include "ltwrappr.h"

virtual L_BOOL LBitmapWindow::IsPaintActive(L_VOID)

Check if the paint effects is active or not.

Returns

TRUE

Paint Effects is active.

FALSE

Paint Effects is not active.

Required DLLs and Libraries

LTkrn
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:

LBitmapWindow::EnablePaintEffect, LBitmapWindow::IsPaintEffectEnabled, LBitmapWindow::EnablePaintTransition, LBitmapWindow::IsPaintTransitionEnabled.

Topics:

Implementing Special Effects

Example

class LMyBitmapWindow : public LBitmapWindow
{
public:
   L_BOOL IsPaintActive()
   {
      return LBitmapWindow :: IsPaintActive();
   }
};
L_INT LBitmapWindow__IsPaintActiveExample(HWND hWndParent)
{
   L_INT nRet;
   LMyBitmapWindow LeadBWnd ;
   nRet = LeadBWnd.Load(TEXT("C:\\Program Files\\LEAD Technologies, Inc\\LEADTOOLS 15.0\\Images\\image1.cmp"));
   if (nRet  == SUCCESS)
   {
      COLORREF   PatternBackColor ;
      COLORREF   PatternForeColor ;
      if (LeadBWnd.CreateWnd( hWndParent, TRUE, 0, 0, 100, 100) == NULL)
         return 0;
      
      if (LeadBWnd.GetPatternStyle() != EFX_PATTERN_DOWNWARD_DIAG)
         LeadBWnd.SetPatternStyle(EFX_PATTERN_DOWNWARD_DIAG) ;
      PatternBackColor = LeadBWnd.GetPatternBackColor() ;
      // do process on background color
      //...
      LeadBWnd.SetPatternBackColor(RGB(255,0,255)) ;
      //...
      PatternForeColor = LeadBWnd.GetPatternForeColor();
      // do process on foreground color
      
      //...
      LeadBWnd.SetPatternForeColor(RGB(0,255,0)) ;
      //...
      if (LeadBWnd.GetROP3() != SRCCOPY)
         LeadBWnd.SetROP3(SRCCOPY) ;
      if (LeadBWnd.IsPaintSizeUseDPIEnabled() == FALSE)
         LeadBWnd.EnablePaintSizeUseDPI(TRUE) ;
      if (LeadBWnd.IsDrawGradientEnabled() == FALSE)
         LeadBWnd.EnableDrawGradient(TRUE) ;
      if (LeadBWnd.IsDrawPatternEnabled() == FALSE)
         LeadBWnd.EnableDrawPattern(TRUE) ;
      if(!LeadBWnd.IsPaintActive())
      {
         if (LeadBWnd.IsPaintEffectEnabled() == FALSE)
            LeadBWnd.EnablePaintEffect(TRUE) ;
         if (LeadBWnd.IsPaintTransitionEnabled() == FALSE)
            LeadBWnd.EnablePaintTransition(TRUE) ;
      }
      LeadBWnd.Repaint();
   }
   else
      return nRet;
   return SUCCESS ;
}