L_PntDlgFill
#include "ltpdg.h"
L_INT EXT_FUNCTION L_PntDlgFill(hWnd, pFillDlgInfo)
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_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 g_DlgFillInfo ;
L_VOID FillDlgTest ( HWND hWnd, L_BOOL fUseDef )
{
if ( fUseDef == TRUE )
{
g_DlgFillInfo.dwFlags = PAINT_DLG_FILL_INITUSEDEFAULT | PAINT_DLG_FILL_SHOWALL ;
}
else
{
g_DlgFillInfo.nSize = sizeof ( PAINTDLGFILLINFO ) ;
g_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;
g_DlgFillInfo.pszTitle = TEXT("Lead Fill Common Dialog ") ;
g_DlgFillInfo.nStyle = PAINT_FILL_STYLE_GRADIENT ;
g_DlgFillInfo.crSolidFillColor = RGB ( 255, 0, 0 ) ;
g_DlgFillInfo.ppszBackgroundTileBitmap = g_ppszBackgroundTileBitmap ;
g_DlgFillInfo.uBackgroundTileBitmapCount = 6;
g_DlgFillInfo.nActiveBackgroundTileBitmapItem = 1 ;
g_DlgFillInfo.nGradientStyle = PAINT_FILL_GRADIENT_STYLE_CONE_FROM_L;
g_DlgFillInfo.crGradientStartColor = RGB ( 255, 0, 0 ) ;
g_DlgFillInfo.crGradientEndColor = RGB ( 0, 0, 255 ) ;
g_DlgFillInfo.uGradientSteps = 200 ;
g_DlgFillInfo.ppszPaperTexture = g_ppszPaperTexture ;
g_DlgFillInfo.uPaperTextureCount = 6 ;
g_DlgFillInfo.nActivePaperTextureItem = -1 ;
}
L_PntDlgFill ( hWnd, &g_DlgFillInfo ) ;
return ;
}