L_PntDlgBrush

#include "ltpdg.h"

L_INT EXT_FUNCTION L_PntDlgBrush(hWnd, pBrushDlgInfo)

HWND hWnd;

/*owner of the dialog */

pPAINTDLGBRUSHINFO pBrushDlgInfo;

/* pointer to a structure */

Brings up the paintbrush properties dialog box.

Parameter

Description

hWnd

Handle of the window that owns the dialog.

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

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_PntBrushLineTo, L_PntBrushMoveTo

Topics:

DigitalPaint Functions: DigitalPaint Common Dialogs

 

Using the DigitalPaint Common Dialogs

Example

// This example will display the brush common dialog 

L_TCHAR * g_ppszTouchImage [ ] = { TEXT("Image 0"), TEXT("Image 1"), TEXT("Image 2"), TEXT("Image 3"), TEXT("Image 4") } ;
PAINTDLGBRUSHINFO g_DlgBrushInfo ; 

L_VOID BrushDlgTest ( HWND hWnd, L_BOOL fUseDef ) 
{
   if ( fUseDef == TRUE ) 
   {  
      g_DlgBrushInfo.dwFlags = PAINT_DLG_BRUSH_INITUSEDEFAULT |  PAINT_DLG_BRUSH_SHOWALL ; 
   }
   else
   {
       g_DlgBrushInfo.nSize          = sizeof ( PAINTDLGBRUSHINFO ) ;
       g_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;


       g_DlgBrushInfo.pszTitle              = TEXT("Lead Brush Common Dialog ") ;
       g_DlgBrushInfo.nContentsType  = PAINT_TOUCH_CONTENTS_COLOR; 
       g_DlgBrushInfo.crColor               = RGB ( 255, 0, 0 ) ; 
       g_DlgBrushInfo.ppszTouchImage = g_ppszTouchImage ;
       g_DlgBrushInfo.uTouchImageCount  = 5 ;
       g_DlgBrushInfo.nActiveTouchImageItem = 1 ;
       g_DlgBrushInfo.crTransparentColor = RGB(0, 0, 0) ;
       g_DlgBrushInfo.nDiameter                = 15 ;    
       g_DlgBrushInfo.nHardnessValue      = 75 ;
       g_DlgBrushInfo.nSpacing                 = 10 ;
       g_DlgBrushInfo.nOpacity                  = 10 ;  

   }
   L_PntDlgBrush ( hWnd, &g_DlgBrushInfo ) ;

   return ;

}