Combine example for C++ 4.0 and later

This example copies the Lead1 bitmap to Lead2, trims and filters the copied image, and combines the filtered image with the original Lead1 bitmap image. Trimming Lead2 lets you see the difference between filtered and nonfiltered regions.

BeginWaitCursor();
m_Lead2.SetBitmap(m_Lead1.GetBitmap());
float TrimLeft = (m_Lead2.GetBitmapWidth() * 0.2f);
float TrimTop = (m_Lead2.GetBitmapHeight() * 0.2f);
float TrimWidth = (m_Lead2.GetBitmapWidth() * 0.6f);
float TrimHeight = (m_Lead2.GetBitmapHeight() * 0.6f);
m_Lead2.Trim(TrimLeft, TrimTop, TrimWidth, TrimHeight);
m_Lead2.SpatialFilter (FLT_LINESEG_LTOR);
float DstLeft = TrimLeft;
float DstTop = TrimTop;
float DstWidth = TrimWidth;
float DstHeight = TrimHeight;
float SrcLeft = 0.0f;
float SrcTop = 0.0f;
m_Lead1.Combine(DstLeft, DstTop, DstWidth, DstHeight, m_Lead2.GetBitmap(), SrcLeft, SrcTop, CB_OP_ADD);
m_Lead1.ForceRepaint();
EndWaitCursor();