L_PntDlgBrush

Summary

Brings up the paintbrush properties dialog box.

Syntax

#include "ltpdg.h"

L_LTPDG_API L_INT L_PntDlgBrush(hWnd, pBrushDlgInfo)

Parameters

L_HWND hWnd

Handle of the window that owns the dialog.

pPAINTDLGBRUSHINFO pBrushDlgInfo

Pointer to a PAINTDLGBRUSHINFO structure that contains paintbrush information. The values present in pBrushDlgInfo when the function is called are used to initialize the dialog, if PAINT_DLG_BRUSH_INITUSEDEFAULT is not set in the dwFlags member of pBrushDlgInfo. 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 brush common dialog.

L_INT PntDlgBrushExample(HWND hWnd,L_BOOL fUseDef) 
{ 
   L_INT nRet; 
   L_TCHAR * g_ppszTouchImage [ ] = {TEXT("Image 0"), 
                                     TEXT("Image 1"), 
                                     TEXT("Image 2"), 
                                     TEXT("Image 3"), 
                                     TEXT("Image 4")} ; 
 
   PAINTDLGBRUSHINFO dlgBrushInfo; 
 
   memset(&dlgBrushInfo, 0, sizeof(dlgBrushInfo)); 
   if ( fUseDef == TRUE )  
   {   
      dlgBrushInfo.dwFlags = PAINT_DLG_BRUSH_INITUSEDEFAULT | 
                               PAINT_DLG_BRUSH_SHOWALL        ; 
   } 
   else 
   { 
       dlgBrushInfo.nSize                  = sizeof ( PAINTDLGBRUSHINFO ); 
       dlgBrushInfo.dwFlags                = PAINT_DLG_BRUSH_SHOWTOUCHCONTENT | 
                                               PAINT_DLG_BRUSH_SHOWTOUCHCOLOR   | 
                                               PAINT_DLG_BRUSH_SHOWTOUCHIMAGE   | 
                                               PAINT_DLG_BRUSH_SHOWDIAMETER     | 
                                               PAINT_DLG_BRUSH_SHOWHARDNESS     | 
                                               PAINT_DLG_BRUSH_SHOWSPACING      | 
                                               PAINT_DLG_BRUSH_SHOWOPACITY      | 
                                               PAINT_DLG_BRUSH_SHOWDEFAULT      ; 
       dlgBrushInfo.pszTitle               = TEXT("Lead Brush Common Dialog ") ; 
       dlgBrushInfo.nContentsType          = PAINT_TOUCH_CONTENTS_COLOR; 
       dlgBrushInfo.crColor                = RGB ( 255, 0, 0 ) ; 
       dlgBrushInfo.ppszTouchImage         = g_ppszTouchImage ; 
       dlgBrushInfo.uTouchImageCount       = 5 ; 
       dlgBrushInfo.nActiveTouchImageItem  = 1 ; 
       dlgBrushInfo.crTransparentColor     = RGB(0, 0, 0) ; 
       dlgBrushInfo.nDiameter              = 15 ; 
       dlgBrushInfo.nHardnessValue         = 75 ; 
       dlgBrushInfo.nSpacing               = 10 ; 
       dlgBrushInfo.nOpacity               = 10 ; 
   } 
   nRet = L_PntDlgBrush ( hWnd, &dlgBrushInfo ) ; 
   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.