L_PntDlgBrush
#include "ltpdg.h"
L_LTPDG_API L_INT L_PntDlgBrush(hWnd, pBrushDlgInfo)
L_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: |
|
|
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; }