ADDFRAMEDLGPARAMS

typedef struct _ADDFRAMEDLGPARAMS 
{ 
   L_UINT uStructSize ; 
   pBITMAPHANDLE pBitmap ; 
   L_BOOL bZoomToFit ; 
   L_BOOL bKeepFrameState; 
   L_BOOL bUseMask; 
   COLORREF crMask; 
   BYTE SmoothEdge; 
   L_INT nLocation; 
   L_INT nQuality; 
   LPDLGBITMAPLIST pBitmapList ; 
   L_INT nFrameBitmapIndex ; 
   L_UINT32 uDlgFlags ; 
   LTCOMMDLGHELPCB pfnHelpCallback; 
   L_VOID *pHelpCallBackUserData; 
} ADDFRAMEDLGPARAMS, * LPADDFRAMEDLGPARAMS ; 

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

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)".

bKeepFrameState

Flag that indicates the state of the frame bitmap. This flag is only used as an input and only when DLG_ADDFRAME_AUTOPROCESS flag is set in the uDlgFlags member. Possible values are:

Value Meaning
TRUE Keep the state of the frame bitmap and operate on a copy of the frame bitmap.
FALSE Work on the original frame bitmap so this bitmap may be resized during the L_AddFrame function.

bUseMask

Flag that indicates whether to force the bitmap to be put on a specific region of the frame bitmap. Set this to indicate the initial value for the dialog. This member will be updated based on whether the Use Mask check box in the dialog is checked or cleared. Possible values are:

Value Meaning
TRUE Select a region on the frame bitmap with the same color specified in crMask and place the bitmap in this region.
FALSE Put the bitmap in the center of the frame bitmap. This is the default value.

crMask

The COLORREF value that specifies the masking color to use when bUseMask is set to TRUE. Set this to indicate the initial value for the dialog. This member will be updated with the color selected in the dialog.

SmoothEdge

Value that indicates the amount to smooth the edge between the frame and the original bitmap. This value is used only when bUseMask is set to FALSE. Valid values range from 0 to 255. Set this to indicate the initial value for the dialog. This member will be updated with the value entered in the Tolerance box in the dialog.

nLocation

Flag that indicates the location of the frame with respect to the bitmap. Set this to indicate the initial value for the dialog. This member will be updated with the value entered in the Placement Combo box in the dialog. Possible values are:

Value Meaning
FRAME_INSIDE [0] The frame will be within the original bitmap. This is the default.
FRAME_OUTSIDE [1] The frame will be outside the original bitmap.

nQuality

Flag that specifies the quality of the resulting bitmap. Set this to indicate the initial value for the dialog. This member will be updated with the value entered in the Quality combo box in the dialog. Possible values are:

Value Meaning
FRAME_QUALITY_LOW [0] Give the resulting bitmap normal quality.
FRAME_QUALITY_HIGH [1] Give the resulting bitmap high quality.

pBitmapList

Pointer to a DLGBITMAPLIST structure that is used to initialize the image picker in the dialog. The bitmap list should contain frame bitmaps, which are used to preview the add frame effect. For more information, refer to L_AddFrame. 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.

nFrameBitmapIndex

Index of the frame bitmap to use from the image picker. This is an index into the pBitmapList member. Set this before calling L_DlgAddFrame to indicate the initial value for the image picker. This member will be updated to the frame image selected in the image picker.

uDlgFlags

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

Value Meaning
DLG_ADDFRAME_AUTOPROCESS [0x00000001] Process the image on OK. The pBitmap member of this structure should contain a valid bitmap
DLG_ADDFRAME_SHOW_CONTEXTHELP [0x00000002] Dialog should contain a context sensitive help icon.
DLG_ADDFRAME_SHOW_PREVIEW [0x00000004] Show a preview of the image in the dialog. The pBitmap member of this structure should contain a valid bitmap.
DLG_ADDFRAME_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_ADDFRAME_SHOW_APPLY [0x00000100] Show the Apply button in the dialog. The dialog will not apply any effect unless the user presses the Apply button.
DLG_ADDFRAME_SHOW_TOOL_COLORPICKER [0x00000010] Show the Color 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.

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

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