Do you mean you want to use L_SetBitmapRgnMagicWand? If yes, here's this sample code from our API help file:
L_INT SetBitmapRgnMagicWandExample(pBITMAPHANDLE pBitmap,
L_HWND hWnd,
L_INT x,
L_INT y)
{
L_INT nRet;
RGNXFORM XForm;
nRet = L_PointToBitmap(pBitmap, TOP_LEFT, &x, &y);
if(nRet != SUCCESS)
return nRet;
if(L_BitmapHasRgn(pBitmap))
nRet = L_SetBitmapRgnMagicWand(pBitmap, x, y, (20,30,15),(15,30,10), L_RGN_OR);
else
nRet = L_SetBitmapRgnMagicWand(pBitmap, x, y, (20,30,15),(15,30,10), L_RGN_SET);
if(nRet == SUCCESS)
{
if(L_BitmapHasRgn(pBitmap))
{
HDC hDC=GetDC(hWnd);
XForm.uViewPerspective=TOP_LEFT;
XForm.nXScalarNum=1;
XForm.nXScalarDen=1;
XForm.nYScalarNum=1;
XForm.nYScalarDen=1;
XForm.nXOffset=0;
XForm.nYOffset=0;
L_FrameBitmapRgn(hDC, pBitmap, &XForm, 3);
ReleaseDC(hWnd, hDC);
}
else
{
MessageBox(hWnd, TEXT("no rgn"), TEXT("error"), MB_OK);
return nRet;
}
}
return SUCCESS;
}
Please see the help topic "L_SetBitmapRgnMagicWand" for more information.