CombineExt example for C++ Builder
int TrimLeft;
int TrimTop, TrimWidth, TrimHeight;
int DstLeft, DstTop, DstWidth, DstHeight;
int SrcLeft, SrcTop;
LEADImage2->Bitmap = LEADImage1->Bitmap;
TrimLeft = (int)(LEADImage2->BitmapWidth * 0.2);
TrimTop = (int)(LEADImage2->BitmapHeight * 0.2);
TrimWidth = (int)(LEADImage2->BitmapWidth * 0.6);
TrimHeight = (int)(LEADImage2->BitmapHeight * 0.6);
LEADImage2->Trim (TrimLeft, TrimTop, TrimWidth, TrimHeight);
LEADImage2->SpatialFilter (FLT_LINESEG_HORZ);
DstLeft = TrimLeft;
DstTop = TrimTop;
DstWidth = TrimWidth;
DstHeight = TrimHeight;
SrcLeft = 0;
SrcTop = 0;
LEADImage1->CombineExt (DstLeft, DstTop, DstWidth, DstHeight, LEADImage2->Bitmap, SrcLeft, SrcTop, CB_OP_ADD);
LEADImage1->ForceRepaint();