WindowlevelCellAction Example for Visual C++ 5.0

void WindowlevelCellAction(CLEADRasterContainerViewer * pLEADContainerViewer) 
{
   TRY
   {   
      pLEADContainerViewer->SetEnableMethodErrors (TRUE); 

      if(!pLEADContainerViewer->WindowLevelAction ().GetUse ())
         pLEADContainerViewer->WindowLevelAction().ActivateAction (TRUE, 0); 

      // Specify Window level cell parameters. 
      pLEADContainerViewer->WindowLevelAction().SetWidth (2000); 
      pLEADContainerViewer->WindowLevelAction().SetCenter(1000); 
      pLEADContainerViewer->WindowLevelAction().SetFillType (FILLLUT_LINEAR); 
      
      // Apply Window level on subcell 0 of cell 0. 
      pLEADContainerViewer->WindowLevelAction().SetAction (0, 0, CONVIEW_ACTIONLEVEL_CELL); 

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