|
Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LRasterDialog::DoModalShape
#include "Ltwrappr.h"
L_INT LRasterDialog::DoModalShape(hWnd, pShapeDlgInfo)
HWND hWnd; |
/* owner of the dialog */ |
pPAINTDLGSHAPEINFO pShapeDlgInfo; |
/* pointer to a structure */ |
Brings up the shape properties dialog box.
Parameter |
Description |
hWnd |
Handle of the window that owns the dialog. |
pShapeDlgInfo |
Pointer to a PAINTDLGSHAPEINFO structure that contains shape information. The values present in pShapeDlgInfo when the function is called are used to initialize the dialog, if PAINT_DLG_SHAPE_INITUSEDEFAULT is not set in the dwFlags member of pShapeDlgInfo. When this function returns, this parameter is updated with the values entered through the dialog. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes |
Required DLLs and Libraries
LTPDG For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
See Also
Example
This example will display the Shape common dialog.
L_INT LRasterDialog_DoModalShapeExample( HWND hWnd, L_BOOL bUseDef ) { L_INT nRet; L_TCHAR * ppszPaperTexture [ ] = { TEXT("Paper 0"), TEXT("Paper 1"), TEXT("Paper 2"), TEXT("Paper 3"), TEXT("Paper 4"), TEXT("Paper 5") } ; PAINTDLGSHAPEINFO DlgShapeInfo ; LRasterDialog lRstDlg ; if ( bUseDef == TRUE ) { DlgShapeInfo.dwFlags = PAINT_DLG_SHAPE_INITUSEDEFAULT | PAINT_DLG_SHAPE_SHOWALL ; } else { DlgShapeInfo.nSize = sizeof ( PAINTDLGSHAPEINFO ) ; DlgShapeInfo.dwFlags = PAINT_DLG_SHAPE_SHOWBKGRNDSTYLE | PAINT_DLG_SHAPE_SHOWBKOPAQUECOLOR | PAINT_DLG_SHAPE_SHOWBORDERSTYLE | PAINT_DLG_SHAPE_SHOWBORDERWIDTH | PAINT_DLG_SHAPE_SHOWBORDERBRUSHSTYLE | PAINT_DLG_SHAPE_SHOWBORDERCOLOR | PAINT_DLG_SHAPE_SHOWGRADIENTSTYLE | PAINT_DLG_SHAPE_SHOWGRADIENTDIRECTION | PAINT_DLG_SHAPE_SHOWGRADIENTSTARTCOLOR| PAINT_DLG_SHAPE_SHOWGRADIENTENDCOLOR | PAINT_DLG_SHAPE_SHOWGRADIENTPREVIEW | PAINT_DLG_SHAPE_SHOWGRADIENTSTEPS | PAINT_DLG_SHAPE_SHOWENDCAP | PAINT_DLG_SHAPE_SHOWELLIPSEWIDTH | PAINT_DLG_SHAPE_SHOWELLIPSEHEIGHT | PAINT_DLG_SHAPE_SHOWOPACITY | PAINT_DLG_SHAPE_SHOWTEXTURE | PAINT_DLG_SHAPE_SHOWDEFAULT ; DlgShapeInfo.pszTitle = TEXT("Lead Shape Common Dialog ") ; DlgShapeInfo.nBackgroundStyle = PAINT_SHAPE_BACK_STYLE_GRADIENT ; DlgShapeInfo.crBackgroundColor = RGB ( 255, 0, 0 ) ; DlgShapeInfo.nBorderStyle = PAINT_SHAPE_BORDER_STYLE_DOT; DlgShapeInfo.nBorderWidth = 10; DlgShapeInfo.nBorderBrushStyle = PAINT_SHAPE_BORDER_BRUSH_STYLE_COLOR ; DlgShapeInfo.crBorderColor = RGB ( 0, 255, 0 ) ; DlgShapeInfo.nGradientStyle = PAINT_SHAPE_GRADIENT_STYLE_RECTANGLE_FROM_C; DlgShapeInfo.crGradientStartColor = RGB ( 255, 0, 0 ) ; DlgShapeInfo.crGradientEndColor = RGB ( 0, 0, 255 ) ; DlgShapeInfo.uGradientSteps = 200 ; DlgShapeInfo.nBorderEndCap = PAINT_SHAPE_BORDER_ENDCAP_FLAT ; DlgShapeInfo.nRoundRectEllipseWidth = 10 ; DlgShapeInfo.nRoundRectEllipseHeight = 10 ; DlgShapeInfo.nOpacity = 10; DlgShapeInfo.ppszPaperTexture = ppszPaperTexture ; DlgShapeInfo.uPaperTextureCount = 6; DlgShapeInfo.nActivePaperTextureItem = 3; } nRet = lRstDlg.DoModalShape ( hWnd, &DlgShapeInfo ) ; if(nRet != SUCCESS) return nRet; return SUCCESS; }