TEXTDLGPARAMS

Summary

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

Syntax

typedef struct _TEXTDLGPARAMS 
{ 
   L_UINT uStructSize; 
   pBITMAPHANDLE pBitmap; 
   pBITMAPHANDLE pForegroundBitmap; 
   LPTSTR pszSampleText; 
   L_INT nMaxCount; 
   L_INT nAngle; 
   L_UINT uStyle; 
   L_UINT uAlign; 
   L_BOOL bWordWrap; 
   HFONT hFont; 
   COLORREF crText; 
   COLORREF crHilite; 
   COLORREF crShadow; 
   L_INT nXDepth; 
   L_INT nYDepth; 
   L_BOOL bUseForeImage; 
   L_UINT32 uDlgFlags; 
   LTCOMMDLGHELPCB pfnHelpCallback; 
   L_VOID *pHelpCallBackUserData; 
} TEXTDLGPARAMS,* LPTEXTDLGPARAMS; 

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.

pForegroundBitmap

Pointer to the bitmap to be used for the foreground of the text. This bitmap will be updated if the user chooses a new image using the Browse Image button.

pszSampleText

String that contains the text.

nMaxCount

The maximum size of the text, in bytes.

nAngle

The rotation angle for the text, in tenths of a degree.

uStyle

Flag that indicates the style of the text. For a list of possible values, refer to Effect Text Style Flags.

uAlign

Flag that indicates how to align the text. For a list of possible values, refer to Effect Text Alignment Flags.

bWordWrap

Flag that indicates whether to allow word wrapping. Possible values are:

Value Meaning
TRUE Allow word wrapping.
FALSE Do not allow word wrapping.

hFont

Handle to the font to use.

crText

The text color. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

crHilite

The border color. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

crShadow

The inner band shadow color. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

nXDepth

The horizontal shadow position.

nYDepth

The vertical shadow position.

bUseForeImage

Flag indicating whether to use the foreground image. Possible values are:

Value Meaning
TRUE Use the foreground image referenced in pForegroundBitmap.
FALSE Do not use the foreground image. Use the text color specified in crText.

uDlgFlags

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

Value Meaning
DLG_TEXT_SHOW_CONTEXTHELP [0x00000001] dialog should contain a context sensitive help icon.
DLG_TEXT_SHOW_PREVIEW [0x00000002] show a preview of the image in the dialog. The pBitmap member of this structure should contain a valid bitmap.
DLG_TEXT_AUTOPREVIEW [0x00000004] auto preview when options change
DLG_TEXT_SAMPLETEXT [0x00000008] sample text edit box is an option
DLG_TEXT_STYLE [0x00000010] text style is an option
DLG_TEXT_COLOR [0x00000020] text color is an option
DLG_TEXT_BORDERCOLOR [0x00000040] border color is an option
DLG_TEXT_ALIGN [0x00000080] alignment is an option
DLG_TEXT_ANGLE [0x00000100] angle is an option
DLG_TEXT_WORDWRAP [0x00000200] wordwrap is an option
DLG_TEXT_FONT [0x00000400] font is an option
DLG_TEXT_FOREIMAGE [0x00000800] foreground image is an option
DLG_TEXT_BROWSEIMAGE [0x00001000] browse image button is an option
DLG_TEXT_SHADOWCOLOR [0x00002000] shadow color is an option
DLG_TEXT_SHADOW_X_Y [0x00004000] shadow x and y are options.

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.