PAINTDLGSHAPEINFO

typedef struct _PAINTDLGSHAPEINFO
{
   L_INT nSize;
   L_INT32 dwFlags;
   L_TCHAR * pszTitle;
   PAINTSHAPEBACKSTYLE nBackgroundStyle;   
   COLORREF crBackgroundColor;     
   L_TCHAR ** ppszBackgroundTileBitmap;
   L_UINT uBackgroundTileBitmapCount;
   L_INT nActiveBackgroundTileBitmapItem;
   PAINTSHAPEBORDERSTYLE nBorderStyle;
   L_INT nBorderWidth;
   PAINTSHAPEBORDERBRUSHSTYLE nBorderBrushStyle; 
   COLORREF crBorderColor;   
   L_TCHAR ** pszBorderTileBitmap;
   L_UINT uBorderTileBitmapCount;
   L_INT nActiveBorderTileBitmapItem;
   PAINTSHAPEGRADIENTSTYLE nGradientStyle;
   COLORREF crGradientStartColor;
   COLORREF crGradientEndColor;
   L_UINT uGradientSteps;  
   PAINTSHAPEBORDERENDCAP nBorderEndCap;
   L_INT nRoundRectEllipseWidth; 
   L_INT nRoundRectEllipseHeight; 
   L_INT nOpacity;
   L_TCHAR ** ppszPaperTexture;
   L_UINT uPaperTextureCount;
   L_INT nActivePaperTextureItem;

} PAINTDLGSHAPEINFO, L_FAR *pPAINTDLGSHAPEINFO ;

The PAINTDLGSHAPEINFO structure contains information about the Shape dialog.

Member

Description

nSize

Size of this structure.

dwFlags

User interface flags for the dialog. Determines the layout and action of the dialog. Possible values are

 

Setting

Description

 

PAINT_DLG_SHAPE_SHOWALL

[0x00000001] Show all controls.

 

PAINT_DLG_SHAPE_SHOWBKGRNDSTYLE

[0x00000002] Show Background style control.

 

PAINT_DLG_SHAPE_SHOWBKOPAQUECOLOR

[0x00000004] Show the opaque color control.

 

PAINT_DLG_SHAPE_SHOWGRADIENTSTYLE

[0x00000008] Show Gradient style control.

 

PAINT_DLG_SHAPE_SHOWGRADIENTDIRECTION

[0x00000010] Show Gradient direction control.

 

PAINT_DLG_SHAPE_SHOWGRADIENTSTARTCOLOR

[0x00000020] Show Gradient start color control.

 

PAINT_DLG_SHAPE_SHOWGRADIENTENDCOLOR

[0x00000040] Show Gradient end color control.

 

PAINT_DLG_SHAPE_SHOWGRADIENTPREVIEW

[0x00000080] Show Gradient preview control.

 

PAINT_DLG_SHAPE_SHOWGRADIENTSTEPS

[0x00000100] Show Gradient steps control.

 

PAINT_DLG_SHAPE_SHOWBKGRNDTILE

[0x00000200] Show Background tile control.

 

PAINT_DLG_SHAPE_SHOWOPACITY

[0x00000400] Show Opacity control.

 

PAINT_DLG_SHAPE_SHOWBORDERSTYLE

[0x00000800] Show Border style control.

 

PAINT_DLG_SHAPE_SHOWBORDERWIDTH

[0x00001000] Show Border width control.

 

PAINT_DLG_SHAPE_SHOWBORDERBRUSHSTYLE

[0x00002000] Show Border brush style control.

 

PAINT_DLG_SHAPE_SHOWBORDERCOLOR

[0x00004000] Show Border color control

 

PAINT_DLG_SHAPE_SHOWBORDERPATTERN

[0x00008000] Show Border pattern control

 

PAINT_DLG_SHAPE_SHOWENDCAP

[0x00010000] Show End cap control

 

PAINT_DLG_SHAPE_SHOWELLIPSEWIDTH

[0x00020000] Show Ellipse width control

 

PAINT_DLG_SHAPE_SHOWELLIPSEHEIGHT

[0x00040000] Show Ellipse height control

 

PAINT_DLG_SHAPE_SHOWTEXTURE

[0x00080000] Show Paper texture control

 

PAINT_DLG_SHAPE_SHOWDEFAULT

[0x00100000] Show Default control

 

PAINT_DLG_SHAPE_INITUSEDEFAULT

[0x00200000] Use the initial default values for the dialog control

pszTitle

Character string containing the Dialog box caption text.

nBackgroundStyle

An enumerated type that indicates the background style. For a list of possible values, refer to PAINTSHAPEBACKSTYLE.

crBackgroundColor

COLORREF value that specifies the color to be used to fill the shape when nBackgroundStyle is PAINT_SHAPE_BACK_STYLE_OPAQUE.

ppszBackgroundTileBitmap

Array of strings containing the names of the images used to fill the background tile bitmap combo box.

uBackgroundTileBitmapCount

Number of strings in ppszBackgroundTileBitmap.

nActiveBackgroundTileBitmapItem

Index of the image currently selected in the paper texture combo box.

nBorderStyle

An enumerated type that indicates the border style. For a list of possible values, refer to PAINTSHAPEBORDERSTYLE.

nBorderWidth

Value indicating the width of the border, in pixels. Valid values are 1 to 100.

nBorderBrushStyle

An enumerated type that indicates the brush style used to draw the shape's border. For a list of possible values, refer to PAINTSHAPEBORDERBRUSHSTYLE.

crBorderColor

COLORREF value that specifies the color used to draw the shape's border.

ppszBorderTileBitmap

Array of strings containing the names of the images used to fill the border tile bitmap combo box.

uBorderTileBitmapCount

Number of strings in ppszBorderTileBitmap.

nActiveBorderTileBitmapItem

Index of the image currently selected in the background tile combo box.

nGradientStyle

An enumerated type that indicates the shape's background gradient fill style. For a list of possible values, refer to PAINTSHAPEGRADIENTSTYLE.

crGradientStartColor

COLORREF value that specifies the color that will start the background gradient fill.

crGradientEndColor

COLORREF value that specifies the color that will end the background gradient fill.

uGradientSteps

Number of gradient color steps. Valid values are 2 to 255.

nBorderEndCap

An enumerated type that indicates how the ends of lines will be drawn. For a list of possible values, refer to PAINTSHAPEBORDERENDCAP.

nRoundRectEllipseWidth

Value indicating the width, in pixels, of the ellipse used to create a rounded rectangle. Valid values are 0 to 500.

nRoundRectEllipseHeight

Value indicating the height, in pixels, of the ellipse used to create a rounded rectangle. Valid values are 0 to 500.

nOpacity

Value indicating the transparency of the shape when combined with the painting canvas. Valid values are 0 to 255. A color or an image with an opacity of 255 is transparent a color or an image with an opacity of 0 is completely opaque (solid).

ppszPaperTexture

Array of strings containing the names of the images used to fill the paper texture combo box.

uPaperTextureCount

Number of strings in ppszPaperTexture.

nActivePaperTextureItem

Index of the currently selected image in the paper texture combo box.

Comments

An image of the Shape dialog can be seen below.

image\a3.gif

When the uBackgroundTileBitmapCount field value is set to 0 or when the ppszBackgroundTileBitmap field value is set to NULL, the structure members shown below will automatically be set to the following values:

ppszBackgroundTileBitmap= NULL
uBackgroundTileBitmapCount= 0 
nActiveBackgroundTileBitmapItem = -1 

When the uBorderTileBitmapCount field value is set to 0 or when the ppszBorderTileBitmap field value is set to NULL, the structure members shown below will automatically be set to the following values:

ppszBorderTileBitmap = NULL 
uBorderTileBitmapCount = 0 
nActiveBorderTileBitmapItem = -1 

The nActivePaperTextureItem field value will be –1 when the user selects "none" from the paper texture combo box.

When the value of the nActivePaperTextureItem is set to –1, the current selection in the paper texture combo box will be "none".

When the user presses the default button, the dialog box will reset to the default values, for all fields, except nActiveBackgroundTileBitmapItem. The nActiveBorderTileBitmapItem value will be the value it was before the last call to the Dialog box.