ShowRotateDlg example for C++ Builder

void __fastcall TForm1::ShowRotateDlg1Click(TObject *Sender) 
{
   L_INT nRet; 

   LEADDlgImage1->ZoomToFit = False; 
   LEADDlgImage1->BackgroundColor = RGB ( 255, 0, 0 ); 
   LEADDlgImage1->LEADImage = LEADImage1; 
   LEADDlgImage1->DlgFlags = DLG_ROTATE_AUTOPROCESS |
                            DLG_ROTATE_SHOW_PREVIEW |
                            DLG_ROTATE_SHOW_BACKCOLOR |
                            DLG_ROTATE_SHOW_RESIZE;

   LEADDlgImage1->LEADDlgService = LEADDlgService1; 
   LEADDlgImage1->EnableMethodErrors = false; 
   LEADDlgImage1->ShowHelpButton = true; 

   nRet= LEADDlgImage1->ShowRotateDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      /*output the results*/
      Edit1->Text = IntToStr ( LEADDlgImage1->Angle); 
      if ( LEADDlgImage1->Resize ) 
         Edit2->Text= "True";
      else
         Edit2->Text= "False";

      switch ( LEADDlgImage1->ResizeFlags ) 
      {
         case 0: 
            ShowMessage("Using Resize normal method");
         break; 

         case ROTATE_RESAMPLE: 
            ShowMessage("Using Resize resample method");
         break; 

         case ROTATE_BICUBIC: 
             ShowMessage("Using Resize bicubic method");
         break; 
       }

   }
}
void __fastcall TForm1::LEADDlgImage1DlgHelp (DWORD uDialogID) 
{
   switch ( uDialogID )
   {
      case DLG_HELP_ROTATE: 
         ShowMessage( "Help from Rotate dialog" ); 
         break; 

      case DLG_HELP_SHEAR: 
         ShowMessage( "Help from Shear dialog" ); 
         break; 

      case DLG_HELP_RESIZE: 
         ShowMessage( "Help from Resize dialog" ); 
         break; 

      case DLG_HELP_ADDBORDER: 
         ShowMessage( "Help from Add-Border dialog" ); 
         break; 

      case DLG_HELP_ADDFRAME: 
         ShowMessage( "Help from Add-Frame dialog" ); 
         break; 

      case DLG_HELP_AUTOTRIM: 
         ShowMessage( "Help from Auto-Trim dialog" ); 
         break; 

      case DLG_HELP_CANVASRESIZE: 
         ShowMessage( "Help from Canvas-Resize dialog" ); 
         break; 

      case DLG_HELP_FEATHERSELECTION: 
         ShowMessage( "Help from Feather-Selection dialog" ); 
         break; 
   }
}