ShowGetShapeDlg example for C++ Builder
void __fastcall TForm1::ShowGetShapeDlg1Click(TObject *Sender)
{
int nRet;
LEADDlgEffect1->ShapeBackgroundBitmap = LEADImage2->Bitmap;
LEADDlgEffect1->Shape = EFX_SHAPE_PARALLELOGRAM_R;
LEADDlgEffect1->BackColor = RGB ( 0, 0, 255 );
LEADDlgEffect1->ShapeBackgroundStyle = sbsOpaque;
LEADDlgEffect1->ForeColor = RGB ( 255, 0, 0 );
LEADDlgEffect1->PatternStyle = epsTransparent;
LEADDlgEffect1->ShapeBorderColor = RGB ( 100, 255, 100 );
LEADDlgEffect1->ShapeBorderStyle = sbrSolid;
LEADDlgEffect1->ShapeBorderThickness = 5;
LEADDlgEffect1->ShapeInnerBandHiliteColor = RGB ( 255, 255, 255 );
LEADDlgEffect1->ShapeInnerBandShadowColor = RGB ( 0, 0, 0 );
LEADDlgEffect1->ShapeInnerBandStyle = sibInset;
LEADDlgEffect1->ShapeInnerBandThickness = 3;
LEADDlgEffect1->ShapeOuterBandHiliteColor = RGB ( 255, 255, 0 );
LEADDlgEffect1->ShapeOuterBandShadowColor = RGB ( 255, 0, 255 );
LEADDlgEffect1->ShapeOuterBandStyle = sobInset;
LEADDlgEffect1->ShapeOuterBandThickness = 5;
LEADDlgEffect1->ShadowXDepth = 10;
LEADDlgEffect1->ShadowYDepth = 10;
LEADDlgEffect1->ShadowColor = RGB ( 128, 128, 128 );
LEADDlgEffect1->DlgFlags = DLG_SHAPE_SHOW_PREVIEW |
DLG_SHAPE_AUTOPREVIEW |
DLG_SHAPE_BACKSTYLE |
DLG_SHAPE_FILLSTYLE |
DLG_SHAPE_FORE_BACK_COLOR |
DLG_SHAPE_BORDERSTYLE |
DLG_SHAPE_BORDERWIDTH |
DLG_SHAPE_BORDERCOLOR |
DLG_SHAPE_INNERSTYLE |
DLG_SHAPE_INNERWIDTH |
DLG_SHAPE_INNER_HILITE_SHADOW |
DLG_SHAPE_OUTERSTYLE |
DLG_SHAPE_OUTERWIDTH |
DLG_SHAPE_OUTER_HILITE_SHADOW |
DLG_SHAPE_SHADOWCOLOR |
DLG_SHAPE_SHADOW_X_Y |
DLG_SHAPE_BROWSEIMAGE |
DLG_SHAPE_CLASS_SQUARE |
DLG_SHAPE_CLASS_RECTANGLE |
DLG_SHAPE_CLASS_PARALLELOGRAM |
DLG_SHAPE_CLASS_TRAPEZOID |
DLG_SHAPE_CLASS_TRIANGLE |
DLG_SHAPE_CLASS_OTHER |
DLG_SHAPE_CLASS_CIRCLE |
DLG_SHAPE_CLASS_ELLIPSE |
DLG_SHAPE_CLASS_STAR |
DLG_SHAPE_CLASS_CROSS |
DLG_SHAPE_CLASS_ARROW;
LEADDlgEffect1->LEADImage = LEADImage1;
LEADDlgEffect1->LEADDlgService = LEADDlgService1;
LEADDlgEffect1->EnableMethodErrors = false;
LEADDlgEffect1->ShowHelpButton = true;
nRet= LEADDlgEffect1->ShowGetShapeDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
LEADImage1->ShapeLeft= 50;
LEADImage1->ShapeTop= 50;
LEADImage1->ShapeWidth= LEADImage1->DstWidth - 50;
LEADImage1->ShapeHeight= LEADImage1->DstHeight - 50;
LEADImage1->PatternBackColor= (TColor)LEADDlgEffect1->BackColor;
LEADImage1->BackgroundImageLeft= 0;
LEADImage1->BackgroundImageTop= 0;
LEADImage1->BackgroundImageWidth= LEADImage2->BitmapWidth;
LEADImage1->BackgroundImageHeight= LEADImage2->BitmapHeight;
LEADImage1->ShapeBackgroundStyle= LEADDlgEffect1->ShapeBackgroundStyle;
LEADImage1->PatternForeColor= (TColor)LEADDlgEffect1->ForeColor;
LEADImage1->PatternStyle= LEADDlgEffect1->PatternStyle;
LEADImage1->ShapeBorderColor= (TColor)LEADDlgEffect1->ShapeBorderColor;
LEADImage1->ShapeBorderStyle= LEADDlgEffect1->ShapeBorderStyle;
LEADImage1->ShapeBorderThickness= LEADDlgEffect1->ShapeBorderThickness;
LEADImage1->ShapeInnerBandHiliteColor= (TColor)LEADDlgEffect1->ShapeInnerBandHiliteColor;
LEADImage1->ShapeInnerBandShadowColor= (TColor)LEADDlgEffect1->ShapeInnerBandShadowColor;
LEADImage1->ShapeInnerBandStyle= LEADDlgEffect1->ShapeInnerBandStyle;
LEADImage1->ShapeInnerBandThickness= LEADDlgEffect1->ShapeInnerBandThickness;
LEADImage1->ShapeOuterBandHiliteColor= (TColor)LEADDlgEffect1->ShapeOuterBandHiliteColor;
LEADImage1->ShapeOuterBandShadowColor= (TColor)LEADDlgEffect1->ShapeOuterBandShadowColor;
LEADImage1->ShapeOuterBandStyle= LEADDlgEffect1->ShapeOuterBandStyle;
LEADImage1->ShapeOuterBandThickness= LEADDlgEffect1->ShapeOuterBandThickness;
LEADImage1->ShadowXDepth= LEADDlgEffect1->ShadowXDepth;
LEADImage1->ShadowYDepth= LEADDlgEffect1->ShadowYDepth;
LEADImage1->ShadowColor= (TColor)LEADDlgEffect1->ShadowColor;
LEADImage1->DrawShape ( LEADDlgEffect1->Shape, LEADImage2->Bitmap );
LEADImage1->ForceRepaint ( );
}
}
void __fastcall TForm1::LEADDlgEffect1DlgHelp(DWORD uDialogID)
{
switch ( uDialogID )
{
case DLG_HELP_GETEFFECT:
ShowMessage( "Help from GetEffect dialog" );
break;
case DLG_HELP_GETSHAPE:
ShowMessage( "Help from GetShape dialog" );
break;
case DLG_HELP_GETTEXT:
ShowMessage( "Help from GetText dialog" );
break;
case DLG_HELP_GETGRADIENT:
ShowMessage( "Help from GetGradient dialog" );
break;
case DLG_HELP_GETTRANSITION:
ShowMessage( "Help from GetTransition dialog" );
break;
}
}