ShowGradientDlg Example for C++ 5.0 and later

void CDialogs::OnShowGradientDlg()
{
   int nRet; 
   m_pRasterEfxDlg->Gradient->StartColor= RGB ( 0, 0, 255 ); 
   m_pRasterEfxDlg->Gradient->EndColor= RGB ( 255, 0, 0 ); 
   m_pRasterEfxDlg->Gradient->GradientStyle= EFX_GRADIENT_ANGLE_TO_RT; 
   m_pRasterEfxDlg->Gradient->Steps= 200; 
   m_pRasterEfxDlg->UIFlags= GRADIENT_SHOW_PREVIEW          |
                           GRADIENT_AUTOPREVIEW           |
                           GRADIENT_STARTCOLOR            |
                           GRADIENT_ENDCOLOR              |
                           GRADIENT_STEPS                 |
                           GRADIENT_NO_TREEVIEW           |
                           GRADIENT_CLASS_LINEAR          |
                           GRADIENT_CLASS_ANGULAR         |
                           GRADIENT_CLASS_RECTANGULAR     |
                           GRADIENT_CLASS_ELLIPTICAL      |
                           GRADIENT_CLASS_CONICAL; 


   m_pRasterEfxDlg->Bitmap = m_LeadRasterView.GetRaster ().GetBitmap ();
   nRet = m_pRasterEfxDlg->ShowGradientDlg((long)this->m_hWnd); 
   if ( nRet == 0 && m_pRasterEfxDlg->DialogStatus ==DLG_OK ) 
   {
      CString csRes; 
      csRes.Format(TEXT("GradientStyle: %d\nGradientSteps: %d\nStartColor: %ld\nEndColor: %ld\n"),
                   m_pRasterEfxDlg->Gradient->GradientStyle
                   m_pRasterEfxDlg->Gradient->Steps
                   m_pRasterEfxDlg->Gradient->StartColor
                   m_pRasterEfxDlg->Gradient->EndColor); 
      AfxMessageBox(csRes);   
   }
}