LRasterDialog::DoModalFill

#include "Ltwrappr.h"

L_INT LRasterDialog::DoModalFill(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:

LRasterPaint::SetProperty, LRasterPaint::GetProperty, LRasterPaint::FillBorder, LRasterPaint::FillColorReplace, LRasterPaint::FillSurface

Topics:

Using the DigitalPaint Common Dialogs

Example

This example will display the Fill common dialog.

L_INT LRasterDialog_DoModalFillExample( 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") };
   L_TCHAR*          ppszBackgroundTileBitmap [ ] = { TEXT("Tile 0"), TEXT("Tile 1"), TEXT("Tile 2"), TEXT("Tile 3"), TEXT("Tile 4"), TEXT("Tile 5") };
   PAINTDLGFILLINFO  DlgFillInfo ;
   LRasterDialog     lRstDlg ;
   if ( bUseDef == 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         = 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                 = ppszPaperTexture ;
      DlgFillInfo.uPaperTextureCount               = 6 ;
      DlgFillInfo.nActivePaperTextureItem          = -1 ;
   }
   nRet = lRstDlg.DoModalFill ( hWnd, &DlgFillInfo  ) ;
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}