Brings up the paintbrush properties dialog box.
#include "ltpdg.h"
L_LTPDG_API L_INT L_PntDlgBrush(hWnd, pBrushDlgInfo)
Handle of the window that owns the dialog.
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.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
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;}