Src... example for C++ 4.0 and later

This example uses the source rectangle properties to zoom in on the image.

// Calculate the values to zoom in by 10 percent and center the image.
if (m_Lead1.GetSrcWidth() > 1 && m_Lead1.GetSrcHeight() > 1)
{
  m_Lead1.SetSrcWidth(m_Lead1.GetSrcWidth() * 0.9f);
  m_Lead1.SetSrcHeight(m_Lead1.GetSrcHeight() * 0.9f);
  m_Lead1.SetSrcTop((m_Lead1.GetBitmapHeight() - m_Lead1.GetSrcHeight()) / 2);
  m_Lead1.SetSrcLeft((m_Lead1.GetBitmapWidth() - m_Lead1.GetSrcWidth()) / 2);
}
// Set the clipping area to the same as the destination rectangle
m_Lead1.SetSrcClipWidth(m_Lead1.GetSrcWidth());
m_Lead1.SetSrcClipHeight(m_Lead1.GetSrcHeight());
m_Lead1.SetSrcClipTop(m_Lead1.GetSrcTop());
m_Lead1.SetSrcClipLeft(m_Lead1.GetSrcLeft());
// Redisplay the image
m_Lead1.ForceRepaint();