L_PntDlgFill

Summary

Brings up the fill properties dialog box.

Syntax

#include "ltpdg.h"

L_LTPDG_API L_INT L_PntDlgFill(hWnd, pFillDlgInfo)

Parameters

L_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 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; 
} 

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

LEADTOOLS Digital Paint C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.