SetRgnMagicWand example for C++ 4.0 and later

void CMfcmagDlg::OnMouseUpLeadctrl1(short Button, short Shift, long x, long y) 
{
   m_LEAD1.SetScaleMode(3);
   m_LEAD1.SetRgnMagicWand((float)x, (float)y, 10, L_RGN_SET);
   m_LEAD1.SetRgnFrameType(2);
}