SetRgnMagicWand example for C++ 5.0 and later

void CMfcmagDlg::OnMouseUpLeadrasterview1(short Button, short Shift, float x, float y) 
{
   m_LEADRasterView1.SetScaleMode(3);
   m_LEADRasterView1.GetRaster().SetRgnMagicWand((float)x, (float)y, 10, L_RGN_SET);
   m_LEADRasterView1.SetRgnFrameType(2);
}