Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
L_PntDlgFill
#include "ltpdg.h"
L_LTPDG_API L_INT L_PntDlgFill(hWnd, pFillDlgInfo)
L_HWND hWnd; |
/*owner of the dialog */ |
pPAINTDLGFILLINFO pFillDlgInfo; |
/* pointer to a structure */ |
Brings up the fill properties dialog box.
Parameter |
Description |
hWnd |
Handle of the window that owns the dialog. |
pFillDlgInfo |
Pointer to a PAINTDLGFILLINFO structure that contains fill information. The values present in pFillDlgInfo when the function is called are used to initialize the dialog, if PAINT_DLG_FILL_INITUSEDEFAULT is not set in the dwFlags member of pFillDlgInfo. 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
Functions: |
L_PntSetProperty, L_PntGetProperty, L_PntFillBorder, L_PntFillColorReplace, L_PntFillSurface |
Topics: |
|
|
Example
This example will display the Fill common dialog.
L_INT PntDlgFillExample(HWND hWnd,L_BOOL fUseDef) { L_INT nRet; L_TCHAR * g_ppszPaperTexture [ ] = {TEXT("Paper 0"), TEXT("Paper 1"), TEXT("Paper 2"), TEXT("Paper 3"), TEXT("Paper 4"), TEXT("Paper 5")}; L_TCHAR * g_ppszBackgroundTileBitmap [ ] = {TEXT("Tile 0"), TEXT("Tile 1"), TEXT("Tile 2"), TEXT("Tile 3"), TEXT("Tile 4"), TEXT("Tile 5")}; PAINTDLGFILLINFO dlgFillInfo; memset(&dlgFillInfo, 0, sizeof(dlgFillInfo)); if ( fUseDef == TRUE ) { dlgFillInfo.dwFlags = PAINT_DLG_FILL_INITUSEDEFAULT | PAINT_DLG_FILL_SHOWALL ; } else { dlgFillInfo.nSize = sizeof ( PAINTDLGFILLINFO ) ; dlgFillInfo.dwFlags = PAINT_DLG_FILL_SHOWSTYLE | PAINT_DLG_FILL_SHOWSOLIDFILLCOLOR | PAINT_DLG_FILL_SHOWBKGRNDTILE | PAINT_DLG_FILL_SHOWGRADIENTSTYLE | PAINT_DLG_FILL_SHOWGRADIENTDIRECTION | PAINT_DLG_FILL_SHOWGRADIENTPREVIEW | PAINT_DLG_FILL_SHOWGRADIENTSTARTCOLOR | PAINT_DLG_FILL_SHOWGRADIENTENDCOLOR | PAINT_DLG_FILL_SHOWGRADIENTSTEPS | PAINT_DLG_FILL_SHOWTEXTURE | PAINT_DLG_FILL_SHOWDEFAULT; dlgFillInfo.pszTitle = TEXT("Lead Fill Common Dialog ") ; dlgFillInfo.nStyle = PAINT_FILL_STYLE_GRADIENT ; dlgFillInfo.crSolidFillColor = RGB ( 255, 0, 0 ) ; dlgFillInfo.ppszBackgroundTileBitmap = g_ppszBackgroundTileBitmap ; dlgFillInfo.uBackgroundTileBitmapCount = 6; dlgFillInfo.nActiveBackgroundTileBitmapItem = 1 ; dlgFillInfo.nGradientStyle = PAINT_FILL_GRADIENT_STYLE_CONE_FROM_L; dlgFillInfo.crGradientStartColor = RGB ( 255, 0, 0 ) ; dlgFillInfo.crGradientEndColor = RGB ( 0, 0, 255 ) ; dlgFillInfo.uGradientSteps = 200 ; dlgFillInfo.ppszPaperTexture = g_ppszPaperTexture ; dlgFillInfo.uPaperTextureCount = 6 ; dlgFillInfo.nActivePaperTextureItem = -1 ; } nRet = L_PntDlgFill ( hWnd, &dlgFillInfo ) ; if(nRet != SUCCESS) return nRet; return SUCCESS; }