AlphaActionSample Example for Visual C++ 5.0

void AlphaActionSample(CLEADRasterContainerViewer * pLEADContainerViewer) 
{
   TRY
   {
      pLEADContainerViewer->SetEnableMethodErrors (TRUE); 
      pLEADContainerViewer->WindowLevelAction ().ActivateAction (FALSE, 0); 
      // Activate Alpha action
      if(!pLEADContainerViewer->AlphaAction ().GetUse ())
         pLEADContainerViewer->AlphaAction().ActivateAction (TRUE, 0); 
      // Select left mouse button to control Alpha action parameters. 
      pLEADContainerViewer->AlphaAction().SetMouseButtonAction(CONVIEW_MOUSE_BUTTON_LEFT, CONVIEW_ACTION_ACTIVEONLY|CONVIEW_ACTION_REALTIME); 

      // Select left, right, up, and down keys to control Alpha parameters. 
      pLEADContainerViewer->AlphaAction().SetModifier (CONVIEW_KEY_ALT); 
      pLEADContainerViewer->AlphaAction().SetKey (VK_DOWN); 
      pLEADContainerViewer->AlphaAction().SetKeyboardAction (CONVIEW_MOUSEMOVE_DOWN); 
      pLEADContainerViewer->AlphaAction().SetKey(VK_UP); 
      pLEADContainerViewer->AlphaAction().SetKeyboardAction(CONVIEW_MOUSEMOVE_UP); 

      // Select Alpha cursor. 
      CPictureHolder PicHolder; 
      if(PicHolder.CreateFromIcon(LoadCursor(NULL, IDC_CROSS))) 
      {
         pLEADContainerViewer->AlphaAction().SetCursor (PicHolder.GetPictureDispatch());
      }
      // Specify Alpha parameters. 
      pLEADContainerViewer->AlphaAction().SetChange (100); 
      pLEADContainerViewer->AlphaAction().SetCircularMouseMove (TRUE); 
      
      // Set Alpha parameters. 
      pLEADContainerViewer->AlphaAction ().SetAction (0, 0, CONVIEW_ACTIONLEVEL_CONTAINER); 

   }
   CATCH_ALL(e) 
   {
       e->ReportError();
   }
   END_CATCH_ALL
}