PaintEffect example for C++ 5.0 and later

The following functions use the KeyDown and KeyUp events to repaint the image with effects.

VOID CSampleDlg::OnKeyDownLeadrasterview1(short KeyCode, short Shift)
{
   if (KeyCode == 116) // Code for F5
   {
      m_LEADRasterView1.SetAutoRepaint(FALSE);
      m_LEADRasterView1.SetBackErase(TRUE);
      m_LEADRasterView1.SetEffectGrain(20);
      m_LEADRasterView1.SetEffectDelay(50);
      m_LEADRasterView1.SetWandSize(5);
      m_LEADRasterView1.SetWandColor(RGB(255,255,0));   // Yellow wand
      m_LEADRasterView1.SetPaintEffect(EFX_EFFECT_WIPE_RECTANGLE_IN);
      m_LEADRasterView1.ForceRepaint();
   }
}
VOID CSampleDlg::LEADRasterView1_OnKeyUp(short KeyCode, short Shift)
{
   if (KeyCode == 116) // Code for F5
   {
      m_LEADRasterView1.SetPaintEffect(EFX_EFFECT_WIPE_RECTANGLE_IN);
      m_LEADRasterView1.ForceRepaint();
      m_LEADRasterView1.SetPaintEffect(EFX_EFFECT_NONE);
   }
}