LRasterDialog::DoModalFill

#include "Ltwrappr.h"

L_INT LRasterDialog::DoModalFill(hWnd, pFillDlgInfo)

Brings up the fill properties dialog box.

Parameters

HWND hWnd

Handle of the window that owns the dialog.

pPAINTDLGFILLINFO 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

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes

Required DLLs and Libraries

See Also

Functions

Topics

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 ; 
 
   memset(&DlgFillInfo,0,sizeof(PAINTDLGFILLINFO)); 
 
   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; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DigitalPaint C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.