CancelFloater example for C++ Builder

1.

Add a command button to your main form and code the click procedure as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
   Lead1->AutoFloater = True;
   Lead1->EnableFloater = True;
   Lead1->RgnMarkingMode = mmRectangle;
}

2.

Add a second command button and code the click procedure as follows:

void __fastcall TForm1::Button2Click(TObject *Sender)
{
   Lead1->CancelFloater();
}

3.

When you run the program, Click Button1 .Create a region using the mouse. Move the region with the mouse to a different location inside the bitmap.

 

 

a-

If you want to cancel the operation, click on Button2.

 

b-

If you want to paste the floater and create a new region, click on the bitmap outside the floater.