ShowInvertedTextDlg example for C++ Builder

void __fastcall TForm1::ShowInvertedTextDlg1Click(TObject *Sender) 
{
   LEADDlgImgDoc1->MinInvertWidth = 900; 
   LEADDlgImgDoc1->MinInvertHeight = 56; 
   LEADDlgImgDoc1->MinBlackPercent = 75; 
   LEADDlgImgDoc1->MaxBlackPercent = 95; 
   LEADDlgImgDoc1->WhiteAreaColor = RGB ( 255, 0, 0 ); 
   LEADDlgImgDoc1->BlackAreaColor = RGB ( 0, 0, 255 ); 
   LEADDlgImgDoc1->ProcessFlags = INVERTEDTEXT_USE_DIAGONALS |
                               INVERTEDTEXT_USE_DPI; 
   LEADDlgImgDoc1->DlgFlags = DLG_INVERTEDTEXT_AUTOPROCESS |
                             DLG_INVERTEDTEXT_SHOW_PREVIEW |
                              DLG_INVERTEDTEXT_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgDoc1->LEADImage= LEADImage1; 
   LEADDlgImgDoc1->ShowInvertedTextDlg ( this ); 
}