SetRgnRoundRect example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Declare local variables.*/
int OffsetX, OffsetY;
/*Initialize the variables that we will manipulate to simulate mouse coordinates.*/
OffsetX = Lead1->BitmapWidth / 8;
OffsetY = Lead1->BitmapHeight / 6;
/*Create an elliptical region.*/
Lead1->SetRgnRoundRect(OffsetX, OffsetY, OffsetX, OffsetY, OffsetX / 4 , OffsetY / 4 , L_RGN_SET);
Lead1->RgnFrameType = ftStatic;
/*Apply Emboss effect on the bitmap region */
Lead1->Emboss(EMBOSS_E,600);
/*Repaint the image so that we can see how the image was updated.*/
Lead1->ForceRepaint();
}