ADDBORDERDLGPARAMS

Summary

The ADDBORDERDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgAddBorder function. After the user closes the dialog box, this structure is updated with information about the user's selections.

Syntax

typedef struct _ADDBORDERDLGPARAMS 
{ 
   L_UINT uStructSize ; 
   pBITMAPHANDLE pBitmap ; 
   L_BOOL bZoomToFit ; 
   L_INT nTileBitmapIndex; 
   LPDLGBITMAPLIST pBitmapList; 
   L_INT nLeftThickness; 
   L_INT nTopThickness; 
   L_INT nRightThickness; 
   L_INT nBottomThickness; 
   L_INT nLocation; 
   L_INT nStyle; 
   L_INT nEffectStyle; 
   L_INT nGradientStyle; 
   COLORREF crOpaque; 
   COLORREF crGradientStart; 
   COLORREF crGradientEnd; 
   L_INT nCurveIntensity; 
   L_BOOL bSoftCurve; 
   L_BOOL bShadow; 
   L_INT nShadowSize; 
   L_INT nShadowDirection; 
   L_BOOL bBumpyShadow; 
   L_UINT32 uDlgFlags ; 
   LTCOMMDLGHELPCB pfnHelpCallback; 
   L_VOID *pHelpCallBackUserData; 
} ADDBORDERDLGPARAMS, * LPADDBORDERDLGPARAMS ; 

Members

uStructSize

Size of this structure, in bytes. Use the sizeof operator to calculate this value.

pBitmap

Pointer to the bitmap handle that references the bitmap used for preview or processing.

bZoomToFit

Flag that indicates the initial zoom level for previewing the image. Possible values are:

Value Meaning
TRUE Set the initial zoom level to "Zoom to fit".
FALSE Set the initial zoom level to "Normal (1:1)".

nTileBitmapIndex

Index of tile bitmap to use from the image picker. This is an index into the pBitmapList member.

Set this before calling L_DlgAddBorder to indicate the initial value for the image picker. This value will be updated to the tile image selected in the image picker.

pBitmapList

Pointer to a DLGBITMAPLIST structure that is used to initialize the image picker in the dialog. The pszDescription member of the DLGBITMAPLIST structure will be used as a tool tip for each image in the image picker when the mouse hovers over it.

nLeftThickness

The thickness of the left side of the border in pixels. Set this to indicate the initial value for the dialog. This value will be updated with the value entered in the Left Margin box in the dialog.

nTopThickness

The thickness of the top side of the border in pixels. Set this to indicate the initial value for the dialog. This value will be updated with the value entered in the Top Margin box in the dialog.

nRightThickness

The thickness of the right side of the border in pixels. Set this to indicate the initial value for the dialog. This value will be updated with the value entered in the Right Margin box in the dialog.

nBottomThickness

The thickness of the bottom side of the border in pixels. Set this to indicate the initial value for the dialog. This value will be updated with the value entered in the Bottom Margin box in the dialog.

nLocation

Flag that indicates the position of the border. Set this to indicate the initial value for the dialog. This value will be updated with Placement combo box in the dialog. Possible values are:

Value Meaning
BORDER_INSIDE [0] The border will be within the bitmap. This is the default.
BORDER_OUTSIDE [1] The border will be outside the bitmap.

nStyle

Flag that indicates the style of the border. Set this to indicate the initial value for the dialog. This value will be updated with the value entered in the Border Style combo box in the dialog. Possible values are:

Value Meaning
BORDER_STYLE_TRANSPARENT [0] The border is transparent. Therefore, the bitmap itself shows through as the border. This is the default.
BORDER_STYLE_OPAQUE [1] Use a single color to create the border. The color used is crGradientStart.
BORDER_STYLE_GRADIENT [2] The border contains a color gradient from crGradientStart to crGradientEnd.
BORDER_STYLE_TILES [3] The border is taken from the nTileBitmapIndex bitmap referenced member in pBitmapList list.

nEffectStyle

Flag that indicates the change in the appearance of the border. By default there are no changes. The change also depends on the value of nCurveIntesity. If nCurveIntensity is zero, there are no changes. Set this to indicate the initial value for the dialog. This value will be updated with the value entered in the Effect Style combo box in the dialog. Possible values are:

Value Meaning
BORDER_EFFECT_CURVEDIN [1] Add a 3D appearance to the border by adding a high intensity color to the inner side of the border and a lower intensity color to the outer side of the border.
BORDER_EFFECT_CURVEDOUT [2] Add a 3D appearance to the border by adding a high intensity color to the outer side of the border and a lower intensity color to the inner side of the border.
BORDER_EFFECT_RAISED [3] Add a curved appearance to the border.

nGradientStyle

Flag that indicates the gradient style. Set this to indicate the initial value for the dialog. This member will be updated with the value entered in the Direction combo box in the dialog. Possible values are:

Value Meaning
BORDER_GRAD_INSIDEOUT [0] The gradient starts from the inside of the border and progresses toward the outside of the border. This is the default.
BORDER_GRAD_CENTEROUT [1] The gradient starts from the center of the border and progresses toward both the inside and outside of the border.
BORDER_GRAD_CORNEROUT [2] The gradient starts from the corners of the border.

crOpaque

The COLORREF value that specifies the color to use when nStyle is BORDER_STYLE_OPAQUE. When calling L_AddBorder, use this member for the crGradientStart member of the ADDBORDERINFO structure if nStyle is BORDER_STYLE_OPAQUE. Set this to indicate the initial value for the dialog. This member will be updated with the color selected in the dialog.

crGradientStart

The COLORREF value that specifies the gradient starting color to use when nStyle is BORDER_STYLE_GRADIENT. Set this to indicate the initial value for the dialog. This member will be updated with the color selected in the dialog.

crGradientEnd

The COLORREF value that specifies the gradient ending color to use when nStyle is BORDER_STYLE_GRADIENT. Set this to indicate the initial value for the dialog. This member will be updated with the color selected in the dialog.

nCurveIntensity

Value that indicates the degree to which to change the appearance of the border.

Valid range is from -1000 to 1000. Set this to indicate the initial value for the dialog. This member will be updated with the Intensity box in the dialog.

bSoftCurve

Flag that indicates whether to give the border a soft curve appearance. Set this to indicate the initial value for the dialog. This member will be updated based on whether the Smooth check box in the dialog is checked or cleared. Possible values are:

Value Meaning
TRUE Make the border more homogeneous in intensity, giving the appearance of a smoother curve.
FALSE Do not make the border more homogeneous in intensity.

bShadow

Flag that indicates whether to add a shadow to the border. Set this to indicate the initial value for the dialog. This member will be updated based on whether the Use Shadows check box in the dialog is checked or cleared. Possible values are:

Value Meaning
TRUE Add a shadow to the border.
FALSE Do not add a shadow to the border.

nShadowSize

Value that indicates the width of the shadow, in pixels. This value is used only when bShadow is set to TRUE. Set this to indicate the initial value for the dialog. This member will be updated with the value entered in the Shadows Size box in the dialog.

nShadowDirection

Flag that indicates the direction of the shadow. This value is used only when bShadow is set to TRUE. Set this to indicate the initial value for the dialog. This member will be updated with the value entered in the Shadows Placement combo box in the dialog. Possible values are:

Value Meaning
BORDER_SHADOW_LEFT [0] The shadow is on the left top side of the image. This is the default.
BORDER_SHADOW_RIGHT [1] The shadow is on the right bottom side of the image.
BORDER_SHADOW_SURROUND [2] The shadow surrounds the border.

bBumpyShadow

Flag that indicates whether to increase the intensity near the far edge of the shadow. This member will be updated based on the Shadows Placement combo box in the dialog and is only used when bShadow is set to TRUE. Set this to indicate the initial value for the dialog. Possible values are:

Value Meaning
TRUE Increase the intensity near the far edge of the shadow.
FALSE Do not increase the intensity near the far edge of the shadow.

uDlgFlags

User interface flags for this dialog, which determine the layout and action of the dialog. Possible values are:

Value Meaning
DLG_ADDBORDER_AUTOPROCESS [0x00000001] Process the image on OK. The pBitmap member of this structure should contain a valid bitmap
DLG_ADDBORDER_SHOW_CONTEXTHELP [0x00000002] Dialog should contain a context sensitive help icon.
DLG_ADDBORDER_SHOW_PREVIEW [0x00000004] Show a preview of the image in the dialog. The pBitmap member of this structure should contain a valid bitmap.
DLG_ADDBORDER_SHOW_TOOL_ZOOMLEVEL [0x00000008] Show the "Zoom to fit" and "Zoom Normal" toolbar buttons. The DLG_ADDBORDER_SHOW_PREVIEW flag must be set in order to show these buttons.
DLG_ADDBORDER_SHOW_APPLY [0x00000080] Show the Apply button in the dialog. The dialog will not apply any effect unless the user presses the Apply button.

pfnHelpCallback

Pointer to an optional help callback function. If you do not wish to provide help to this dialog, use NULL as the value of this parameter. To provide help to this dialog, use the function pointer as the value of this parameter. The callback function must adhere to the prototype described in LTCOMMDLGHELPCB.

pHelpCallBackUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pHelpCallBackUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

Usage

Help Version 22.0.2023.2.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.