TimoSoft EditControls  1.11.0.214
ITextBox Interface Reference

The main interface More...

Inherits IDispatch.

Public Member Functions

HRESULT About (void)
 Displays the control's credits More...
 
HRESULT AppendText ([in] BSTR Text, [in, defaultvalue(0)] VARIANT_BOOL setCaretToEnd, [in, defaultvalue(-1)] VARIANT_BOOL scrollToCaret)
 Appends the specified text to the end of the current text More...
 
HRESULT BeginDrag ([in] LONG draggedTextFirstChar, [in] LONG draggedTextLastChar, [in, defaultvalue(0)] OLE_HANDLE hDragImageList, [in, out, defaultvalue(0)] OLE_XPOS_PIXELS *xHotSpot, [in, out, defaultvalue(0)] OLE_YPOS_PIXELS *yHotSpot)
 Enters drag'n'drop mode More...
 
HRESULT CanUndo ([out, retval] VARIANT_BOOL *pValue)
 Determines whether there are any actions in the control's undo queue More...
 
HRESULT CharIndexToPosition ([in] LONG characterIndex, [in, out, defaultvalue(0)] OLE_XPOS_PIXELS *x, [in, out, defaultvalue(0)] OLE_YPOS_PIXELS *y)
 Retrieves the specified character's position in client coordinates More...
 
HRESULT EmptyUndoBuffer (void)
 Clears the control's undo queue More...
 
HRESULT EndDrag ([in] VARIANT_BOOL abort)
 Exits drag'n'drop mode More...
 
HRESULT GetClosestInsertMarkPosition ([in] OLE_XPOS_PIXELS x, [in] OLE_YPOS_PIXELS y, [in, out] InsertMarkPositionConstants *relativePosition, [in, out] LONG *characterIndex)
 Proposes a position for the control's insertion mark More...
 
HRESULT GetDraggedTextRange ([in, out, defaultvalue(0)] LONG *draggedTextFirstChar, [in, out, defaultvalue(0)] LONG *draggedTextLastChar)
 Retrieves the dragged text's start and end More...
 
HRESULT GetFirstCharOfLine ([in] LONG lineIndex, [out, retval] LONG *pValue)
 Retrieves the zero-based index of the first character of the specified line More...
 
HRESULT GetInsertMarkPosition ([in, out] InsertMarkPositionConstants *relativePosition, [in, out] LONG *characterIndex)
 Retrieves the position of the control's insertion mark More...
 
HRESULT GetLine ([in] LONG lineIndex, [out, retval] BSTR *pValue)
 Retrieves the text of the specified line More...
 
HRESULT GetLineCount ([out, retval] LONG *pValue)
 Retrieves the number of lines in the control More...
 
HRESULT GetLineFromChar ([in] LONG characterIndex, [out, retval] LONG *pValue)
 Retrieves the zero-based index of the line that contains the specified character More...
 
HRESULT GetLineLength ([in] LONG lineIndex, [out, retval] LONG *pValue)
 Retrieves the number of characters in the specified line More...
 
HRESULT GetSelection ([in, out, defaultvalue(0)] LONG *selectionStart, [in, out, defaultvalue(0)] LONG *selectionEnd)
 Retrieves the current selection's start and end More...
 
HRESULT HideBalloonTip ([out, retval] VARIANT_BOOL *pSucceeded)
 Hides any balloon tips associated with the control More...
 
HRESULT IsTextTruncated ([in, defaultvalue(0)] LONG lineIndex, [out, retval] VARIANT_BOOL *pValue)
 Determines whether the specified line's text is entirely visible or truncated More...
 
HRESULT LoadSettingsFromFile ([in] BSTR file, [out, retval] VARIANT_BOOL *pSucceeded)
 Loads the control's settings from the specified file More...
 
HRESULT OLEDrag ([in, defaultvalue(NULL)] LONG *pDataObject, [in, defaultvalue(odeCopyOrMove)] OLEDropEffectConstants supportedEffects, [in, defaultvalue(-1)] OLE_HANDLE hWndToAskForDragImage, [in, defaultvalue(-1)] LONG draggedTextFirstChar, [in, defaultvalue(-1)] LONG draggedTextLastChar, [in, defaultvalue(0)] LONG itemCountToDisplay, [out, retval] OLEDropEffectConstants *pPerformedEffects)
 Enters OLE drag'n'drop mode More...
 
HRESULT PositionToCharIndex ([in] OLE_XPOS_PIXELS x, [in] OLE_YPOS_PIXELS y, [in, out, defaultvalue(0)] LONG *characterIndex, [in, out, defaultvalue(0)] LONG *lineIndex)
 Retrieves the character closest to the specified position More...
 
HRESULT Refresh (void)
 Advises the control to redraw itself
 
HRESULT ReplaceSelectedText ([in] BSTR replacementText, [in, defaultvalue(0)] VARIANT_BOOL undoable)
 Replaces the currently selected text More...
 
HRESULT SaveSettingsToFile ([in] BSTR file, [out, retval] VARIANT_BOOL *pSucceeded)
 Saves the control's settings to the specified file More...
 
HRESULT Scroll ([in] ScrollAxisConstants axis, [in] ScrollDirectionConstants directionAndIntensity, [in, defaultvalue(0)] LONG linesToScrollVertically, [in, defaultvalue(0)] LONG charactersToScrollHorizontally)
 Scrolls the control More...
 
HRESULT ScrollCaretIntoView (void)
 Scrolls the control so that the caret is visible More...
 
HRESULT SetInsertMarkPosition ([in] InsertMarkPositionConstants relativePosition, [in] LONG characterIndex)
 Sets the position of the control's insertion mark More...
 
HRESULT SetSelection ([in] LONG selectionStart, [in] LONG selectionEnd)
 Sets the selection's start and end More...
 
HRESULT ShowBalloonTip ([in] BSTR title, [in] BSTR text, [in, defaultvalue(btiNone)] BalloonTipIconConstants icon, [out, retval] VARIANT_BOOL *pSucceeded)
 Displays a balloon tip associated with the control More...
 
HRESULT Undo ([out, retval] VARIANT_BOOL *pSucceeded)
 Undoes the last action in the control's undo queue More...
 
HRESULT FinishOLEDragDrop (void)
 Finishes a pending drop operation More...
 

Properties

VARIANT_BOOL AcceptNumbersOnly [get, set]
 Specifies whether the control accepts numbers only More...
 
VARIANT_BOOL AcceptTabKey [get, set]
 Specifies whether the control processes the [TAB] key More...
 
VARIANT_BOOL AllowDragDrop [get, set]
 Specifies whether the control detects drag'n'drop operations More...
 
VARIANT_BOOL AlwaysShowSelection [get, set]
 Controls how selected text is displayed More...
 
AppearanceConstants Appearance [get, set]
 Controls the style of the control's outer border More...
 
AutoScrollingConstants AutoScrolling [get, set]
 Controls the control's automatic scrolling features More...
 
OLE_COLOR BackColor [get, set]
 Specifies the control's background color More...
 
BorderStyleConstants BorderStyle [get, set]
 Controls the style of the control's inner border More...
 
VARIANT_BOOL CancelIMECompositionOnSetFocus [get, set]
 Controls the control's IME features More...
 
CharacterConversionConstants CharacterConversion [get, set]
 Controls the control's automatic character conversion features More...
 
VARIANT_BOOL CompleteIMECompositionOnKillFocus [get, set]
 Controls the control's IME features More...
 
BSTR CueBanner [get, set]
 Specifies the control's textual cue More...
 
OLE_COLOR DisabledBackColor [get, set]
 Specifies the control's background color More...
 
DisabledEventsConstants DisabledEvents [get, set]
 Controls which events are fired More...
 
OLE_COLOR DisabledForeColor [get, set]
 Specifies the control's text color More...
 
VARIANT_BOOL DisplayCueBannerOnFocus [get, set]
 Controls when the control's textual cue is displayed More...
 
VARIANT_BOOL DontRedraw [get, set]
 Controls redrawing of the control More...
 
VARIANT_BOOL DoOEMConversion [get, set]
 Specifies whether the control tries to work-around character set problems related to filenames More...
 
LONG DragScrollTimeBase [get, set]
 Controls the speed of automatic scrolling during drag'n'drop More...
 
VARIANT_BOOL Enabled [get, set]
 Controls whether the control accepts user input More...
 
LONG FirstVisibleChar [get]
 Retrieves the control's first visible character More...
 
LONG FirstVisibleLine [get]
 Retrieves the control's first visible line More...
 
IFontDisp Font [get, set]
 Specifies the control's font More...
 
OLE_COLOR ForeColor [get, set]
 Specifies the control's text color More...
 
OLE_YSIZE_PIXELS FormattingRectangleHeight [get, set]
 Specifies the height of the control's formatting rectangle More...
 
OLE_XPOS_PIXELS FormattingRectangleLeft [get, set]
 Specifies the x-coordinate of the control's formatting rectangle More...
 
OLE_YPOS_PIXELS FormattingRectangleTop [get, set]
 Specifies the y-coordinate of the control's formatting rectangle More...
 
OLE_XSIZE_PIXELS FormattingRectangleWidth [get, set]
 Specifies the width of the control's formatting rectangle More...
 
HAlignmentConstants HAlignment [get, set]
 Controls the horizontal alignment of the control's content More...
 
OLE_HANDLE hDragImageList [get]
 Retrieves the imagelist containing the drag image More...
 
LONG HoverTime [get, set]
 Controls when the MouseHover event is fired More...
 
OLE_HANDLE hWnd [get]
 Retrieves the control's window handle More...
 
IMEModeConstants IMEMode [get, set]
 Controls the control's IME features More...
 
OLE_COLOR InsertMarkColor [get, set]
 Specifies the color of the control's insertion mark More...
 
VARIANT_BOOL InsertSoftLineBreaks [get, set]
 Controls the control's behavior at line ends More...
 
LONG LastVisibleLine [get]
 Retrieves the control's last visible line More...
 
OLE_XSIZE_PIXELS LeftMargin [get, set]
 Specifies the width of the whitespace to the left of the control's content More...
 
LONG LineHeight [get]
 Retrieves the text lines' height More...
 
LONG MaxTextLength [get, set]
 Specifies the maximum length of the input More...
 
VARIANT_BOOL Modified [get, set]
 Retrieves or sets a flag indicating whether the control's content has changed More...
 
IPictureDisp MouseIcon [get, set]
 Controls the control's mouse cursor More...
 
MousePointerConstants MousePointer [get, set]
 Controls the control's mouse cursor More...
 
VARIANT_BOOL MultiLine [get, set]
 Specifies whether the control displays text in multiple lines More...
 
OLEDragImageStyleConstants OLEDragImageStyle [get, set]
 Specifies the appearance of the OLE drag images generated by the control More...
 
SHORT PasswordChar [get, set]
 Specifies the replacement character for password input fields More...
 
VARIANT_BOOL ProcessContextMenuKeys [get, set]
 Specifies whether the ContextMenu event can be invoked using the keyboard More...
 
VARIANT_BOOL ReadOnly [get, set]
 Specifies whether the user can edit the displayed text More...
 
VARIANT_BOOL RegisterForOLEDragDrop [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
OLE_XSIZE_PIXELS RightMargin [get, set]
 Specifies the width of the whitespace to the right of the control's content More...
 
RightToLeftConstants RightToLeft [get, set]
 Controls the control's right-to-left features More...
 
ScrollBarsConstants ScrollBars [get, set]
 Specifies the scrollbars to show More...
 
BSTR SelectedText [get]
 Retrieves the currently selected text More...
 
IPictureDisp SelectedTextMouseIcon [get, set]
 Controls the control's mouse cursor More...
 
MousePointerConstants SelectedTextMousePointer [get, set]
 Controls the control's mouse cursor More...
 
VARIANT_BOOL ShowDragImage [get, set]
 Controls the visibility of the control's drag image More...
 
VARIANT_BOOL SupportOLEDragImages [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
VARIANT TabStops [get, set]
 Specifies the control's tab stops More...
 
OLE_XSIZE_PIXELS TabWidth [get, set]
 Specifies the width of a tab More...
 
BSTR Text [get, set]
 Specifies the control's content More...
 
LONG TextLength [get]
 Retrieves the length of the text More...
 
VARIANT_BOOL UseCustomFormattingRectangle [get, set]
 Controls which formatting rectangle the control is using More...
 
VARIANT_BOOL UsePasswordChar [get, set]
 Specifies whether the control's content is automatically replaced to hide it More...
 
VARIANT_BOOL UseSystemFont [get, set]
 Specifies whether the control uses the system font More...
 
BSTR Version [get]
 Retrieves the control's version More...
 
LONG WordBreakFunction [get, set]
 Controls word processing More...
 

Detailed Description

The main interface

Author
Timo "TimoSoft" Kunze This is the textbox control's main interface. It wraps the control window.
See also
_ITextBoxEvents

Member Function Documentation

◆ About()

HRESULT About ( void  )

Displays the control's credits

Displays some information about this control and its author.

◆ AppendText()

HRESULT AppendText ( [in] BSTR  Text,
[in, defaultvalue(0)] VARIANT_BOOL  setCaretToEnd,
[in, defaultvalue(-1)] VARIANT_BOOL  scrollToCaret 
)

Appends the specified text to the end of the current text

Parameters
[in]textThe text to append.
[in]setCaretToEndIf True, the caret is automatically moved to the end of the text; otherwise not.
[in]scrollToCaretIf True, the control is automatically scrolled to the caret; otherwise not.
See also
Text

◆ BeginDrag()

HRESULT BeginDrag ( [in] LONG  draggedTextFirstChar,
[in] LONG  draggedTextLastChar,
[in, defaultvalue(0)] OLE_HANDLE  hDragImageList,
[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *  xHotSpot,
[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *  yHotSpot 
)

Enters drag'n'drop mode

Parameters
[in]draggedTextFirstCharThe zero-based index of the first character of the text to drag.
[in]draggedTextLastCharThe zero-based index of the last character of the text to drag.
[in]hDragImageListThe imagelist containing the drag image that shall be used to visualize the drag'n'drop operation. If 0, no drag image is used.
[in,out]xHotSpotThe x-coordinate (in pixels) of the drag image's hotspot relative to the drag image's upper-left corner. If the hDragImageList parameter is set to -1 or 0, this parameter is ignored. This parameter will be changed to the value that finally was used by the method.
[in,out]yHotSpotThe y-coordinate (in pixels) of the drag image's hotspot relative to the drag image's upper-left corner. If the hDragImageList parameter is set to -1 or 0, this parameter is ignored. This parameter will be changed to the value that finally was used by the method.
See also
OLEDrag, GetDraggedTextRange, EndDrag, hDragImageList, _ITextBoxEvents::BeginDrag, _ITextBoxEvents::BeginRDrag

◆ CanUndo()

HRESULT CanUndo ( [out, retval] VARIANT_BOOL *  pValue)

Determines whether there are any actions in the control's undo queue

Returns
True if there are actions in the undo queue; otherwise False.
See also
Undo, EmptyUndoBuffer

◆ CharIndexToPosition()

HRESULT CharIndexToPosition ( [in] LONG  characterIndex,
[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *  x,
[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *  y 
)

Retrieves the specified character's position in client coordinates

Retrieves the position (in pixels) of the specified character within the control's client area.

Parameters
[in]characterIndexThe zero-based index of the character within the control, for which to retrieve the position. If the character is a line delimiter, the returned coordinates indicate a point just beyond the last visible character in the line. If the specified index is greater than the index of the last character in the control, the function fails.
[out]xThe x-coordinate (in pixels) of the character relative to the control's upper-left corner.
[out]yThe y-coordinate (in pixels) of the character relative to the control's upper-left corner.
See also
PositionToCharIndex

◆ EmptyUndoBuffer()

HRESULT EmptyUndoBuffer ( void  )

Clears the control's undo queue

See also
CanUndo, Undo

◆ EndDrag()

HRESULT EndDrag ( [in] VARIANT_BOOL  abort)

Exits drag'n'drop mode

Parameters
[in]abortIf True, the drag'n'drop operation will be handled as aborted; otherwise it will be handled as a drop.
See also
GetDraggedTextRange, BeginDrag, _ITextBoxEvents::AbortedDrag, _ITextBoxEvents::Drop

◆ GetClosestInsertMarkPosition()

HRESULT GetClosestInsertMarkPosition ( [in] OLE_XPOS_PIXELS  x,
[in] OLE_YPOS_PIXELS  y,
[in, out] InsertMarkPositionConstants relativePosition,
[in, out] LONG *  characterIndex 
)

Proposes a position for the control's insertion mark

Retrieves the insertion mark position that is closest to the specified point.

Parameters
[in]xThe x-coordinate (in pixels) of the point for which to retrieve the closest insertion mark position. It must be relative to the control's upper-left corner.
[in]yThe y-coordinate (in pixels) of the point for which to retrieve the closest insertion mark position. It must be relative to the control's upper-left corner.
[out]relativePositionThe insertion mark's position relative to the specified character. The following values, defined by the InsertMarkPositionConstants enumeration, are valid: impBefore, impAfter, impNowhere.
[out]characterIndexThe zero-based index of the character at which the insertion mark should be displayed.
See also
SetInsertMarkPosition, GetInsertMarkPosition, InsertMarkPositionConstants

◆ GetDraggedTextRange()

HRESULT GetDraggedTextRange ( [in, out, defaultvalue(0)] LONG *  draggedTextFirstChar,
[in, out, defaultvalue(0)] LONG *  draggedTextLastChar 
)

Retrieves the dragged text's start and end

Retrieves the zero-based character indices of the dragged text's start and end.

Parameters
[out]draggedTextFirstCharThe zero-based index of the character at which the dragged text starts.
[out]draggedTextLastCharThe zero-based index of the last character of the dragged text.
See also
BeginDrag, OLEDrag

◆ GetFirstCharOfLine()

HRESULT GetFirstCharOfLine ( [in] LONG  lineIndex,
[out, retval] LONG *  pValue 
)

Retrieves the zero-based index of the first character of the specified line

Parameters
[in]lineIndexThe zero-based index of the line to retrieve the first character for. If set to -1, the index of the line containing the caret is used.
Returns
The zero-based index of the first character of the line. -1 if the specified line index is greater than the total number of lines.
See also
GetLineFromChar, MultiLine

◆ GetInsertMarkPosition()

HRESULT GetInsertMarkPosition ( [in, out] InsertMarkPositionConstants relativePosition,
[in, out] LONG *  characterIndex 
)

Retrieves the position of the control's insertion mark

Parameters
[out]relativePositionThe insertion mark's position relative to the specified character. The following values, defined by the InsertMarkPositionConstants enumeration, are valid: impBefore, impAfter, impNowhere.
[out]characterIndexThe zero-based index of the character at which the insertion mark is displayed.
See also
SetInsertMarkPosition, GetClosestInsertMarkPosition, InsertMarkPositionConstants

◆ GetLine()

HRESULT GetLine ( [in] LONG  lineIndex,
[out, retval] BSTR *  pValue 
)

Retrieves the text of the specified line

Parameters
[in]lineIndexThe zero-based index of the line to retrieve the text for.
Returns
The line's text.
See also
GetLineLength, MultiLine, Text

◆ GetLineCount()

HRESULT GetLineCount ( [out, retval] LONG *  pValue)

Retrieves the number of lines in the control

Returns
The number of lines.
See also
FirstVisibleLine, LastVisibleLine, MultiLine

◆ GetLineFromChar()

HRESULT GetLineFromChar ( [in] LONG  characterIndex,
[out, retval] LONG *  pValue 
)

Retrieves the zero-based index of the line that contains the specified character

Parameters
[in]characterIndexThe zero-based index of the character within the control. If set to -1, the index of the character at which the selection begins, is used. If there's no selection, the index of the character next to the caret is used.
Returns
The zero-based index of the line containing the character.
See also
FirstVisibleChar, GetFirstCharOfLine, MultiLine, GetSelection

◆ GetLineLength()

HRESULT GetLineLength ( [in] LONG  lineIndex,
[out, retval] LONG *  pValue 
)

Retrieves the number of characters in the specified line

Parameters
[in]lineIndexThe zero-based index of the line to retrieve the length for. If set to -1, the number of unselected characters on lines containing selected characters is retrieved. E. g. if the selection extended from the fourth character of one line through the eighth character from the end of the next line, the return value would be 10 (three characters on the first line and seven on the next).
Returns
The number of characters in the line.
See also
GetLine, MultiLine

◆ GetSelection()

HRESULT GetSelection ( [in, out, defaultvalue(0)] LONG *  selectionStart,
[in, out, defaultvalue(0)] LONG *  selectionEnd 
)

Retrieves the current selection's start and end

Retrieves the zero-based character indices of the current selection's start and end.

Parameters
[out]selectionStartThe zero-based index of the character at which the selection starts.
[out]selectionEndThe zero-based index of the first unselected character after the end of the selection.
See also
SetSelection, ReplaceSelectedText, SelectedText

◆ HideBalloonTip()

HRESULT HideBalloonTip ( [out, retval] VARIANT_BOOL *  pSucceeded)

Hides any balloon tips associated with the control

Returns
True on success; otherwise False.
Remarks
Requires comctl32.dll version 6.0 or higher.
See also
ShowBalloonTip

◆ IsTextTruncated()

HRESULT IsTextTruncated ( [in, defaultvalue(0)] LONG  lineIndex,
[out, retval] VARIANT_BOOL *  pValue 
)

Determines whether the specified line's text is entirely visible or truncated

Parameters
[in]lineIndexThe zero-based index of the line to check.
Returns
True if not all of the specified line's text is visible; otherwise False.
See also
GetLine

◆ LoadSettingsFromFile()

HRESULT LoadSettingsFromFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Loads the control's settings from the specified file

Parameters
[in]fileThe file to read from.
Returns
True if the settings could be loaded; otherwise False.
See also
SaveSettingsToFile

◆ OLEDrag()

HRESULT OLEDrag ( [in, defaultvalue(NULL)] LONG *  pDataObject,
[in, defaultvalue(odeCopyOrMove)] OLEDropEffectConstants  supportedEffects,
[in, defaultvalue(-1)] OLE_HANDLE  hWndToAskForDragImage,
[in, defaultvalue(-1)] LONG  draggedTextFirstChar,
[in, defaultvalue(-1)] LONG  draggedTextLastChar,
[in, defaultvalue(0)] LONG  itemCountToDisplay,
[out, retval] OLEDropEffectConstants pPerformedEffects 
)

Enters OLE drag'n'drop mode

Parameters
[in]pDataObjectA pointer to the IDataObject implementation to use during OLE drag'n'drop. If not specified, the control's own implementation is used.
[in]supportedEffectsA bit field defining all drop effects you want to support. Any combination of the values defined by the OLEDropEffectConstants enumeration (except odeScroll) is valid.
[in]hWndToAskForDragImageThe handle of the window, that will receive the DI_GETDRAGIMAGE message to specify the drag image to use. If -1, the control creates the drag image itself. If SupportOLEDragImages is set to False, no drag image is used.
[in]draggedTextFirstCharThe zero-based index of the first character of the text to drag. This parameter is used to generate the drag image, if hWndToAskForDragImage is set to -1.
[in]draggedTextLastCharThe zero-based index of the last character of the text to drag. This parameter is used to generate the drag image, if hWndToAskForDragImage is set to -1.
[in]itemCountToDisplayThe number to display in the item count label of Aero drag images. If set to 0 or 1, no item count label is displayed. If set to any value larger than 1, this value is displayed in the item count label.
Returns
The performed drop effect. Any of the values defined by the OLEDropEffectConstants enumeration (except odeScroll) is valid.
See also
BeginDrag, _ITextBoxEvents::BeginDrag, _ITextBoxEvents::BeginRDrag, _ITextBoxEvents::OLEStartDrag, _ITextBoxEvents::OLEGiveFeedback, _ITextBoxEvents::OLEQueryContinueDrag, SupportOLEDragImages, OLEDragImageStyle, OLEDropEffectConstants, DI_GETDRAGIMAGE

◆ PositionToCharIndex()

HRESULT PositionToCharIndex ( [in] OLE_XPOS_PIXELS  x,
[in] OLE_YPOS_PIXELS  y,
[in, out, defaultvalue(0)] LONG *  characterIndex,
[in, out, defaultvalue(0)] LONG *  lineIndex 
)

Retrieves the character closest to the specified position

Retrieves the zero-based index of the character nearest the specified position.

Parameters
[in]xThe x-coordinate (in pixels) of the position to retrieve the nearest character for. It is relative to the control's upper-left corner.
[in]yThe y-coordinate (in pixels) of the position to retrieve the nearest character for. It is relative to the control's upper-left corner.
[out]characterIndexThe zero-based index of the character within the control, that is nearest to the specified position. If the specified point is beyond the last character in the control, this value indicates the last character in the control. The index indicates the line delimiter if the specified point is beyond the last visible character in a line.
[out]lineIndexThe zero-based index of the line, that contains the character specified by the characterIndex parameter.
Remarks
If a point outside the bounds of the control is passed, the function fails.
See also
CharIndexToPosition

◆ ReplaceSelectedText()

HRESULT ReplaceSelectedText ( [in] BSTR  replacementText,
[in, defaultvalue(0)] VARIANT_BOOL  undoable 
)

Replaces the currently selected text

Replaces the control's currently selected text.

Parameters
[in]replacementTextThe text that replaces the currently selected text.
[in]undoableIf True, this action is inserted into the control's undo queue; otherwise not.
See also
GetSelection, SetSelection, SelectedText

◆ SaveSettingsToFile()

HRESULT SaveSettingsToFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Saves the control's settings to the specified file

Parameters
[in]fileThe file to write to.
Returns
True if the settings could be saved; otherwise False.
See also
LoadSettingsFromFile

◆ Scroll()

HRESULT Scroll ( [in] ScrollAxisConstants  axis,
[in] ScrollDirectionConstants  directionAndIntensity,
[in, defaultvalue(0)] LONG  linesToScrollVertically,
[in, defaultvalue(0)] LONG  charactersToScrollHorizontally 
)
property

Scrolls the control

Parameters
[in]axisThe axis which is to be scrolled. Any combination of the values defined by the ScrollAxisConstants enumeration is valid.
[in]directionAndIntensityThe intensity and direction of the action. Any of the values defined by the ScrollDirectionConstants enumeration is valid.
[in]linesToScrollVerticallyThe number of lines to scroll vertically. This parameter is ignored, if directionAndIntensity is not set to sdCustom.
[in]charactersToScrollHorizontallyThe number of characters to scroll horizontally. This parameter is ignored, if directionAndIntensity is not set to sdCustom.
Remarks
This method has no effect if the MultiLine property is set to False.
See also
ScrollCaretIntoView, ScrollBars, AutoScrolling, MultiLine, _ITextBoxEvents::Scrolling, ScrollAxisConstants, ScrollDirectionConstants

◆ ScrollCaretIntoView()

HRESULT ScrollCaretIntoView ( void  )

Scrolls the control so that the caret is visible

Ensures that the control's caret is visible by scrolling the control if necessary.

See also
Scroll, ScrollBars, AutoScrolling, MultiLine, _ITextBoxEvents::Scrolling

◆ SetInsertMarkPosition()

HRESULT SetInsertMarkPosition ( [in] InsertMarkPositionConstants  relativePosition,
[in] LONG  characterIndex 
)

Sets the position of the control's insertion mark

Parameters
[in]relativePositionThe insertion mark's position relative to the specified character. Any of the values defined by the InsertMarkPositionConstants enumeration is valid.
[in]characterIndexThe zero-based index of the character at which to display the insertion mark. If set to -1, the insertion mark is removed.
See also
GetInsertMarkPosition, GetClosestInsertMarkPosition, InsertMarkColor, AllowDragDrop, RegisterForOLEDragDrop, InsertMarkPositionConstants

◆ SetSelection()

HRESULT SetSelection ( [in] LONG  selectionStart,
[in] LONG  selectionEnd 
)

Sets the selection's start and end

Sets the zero-based character indices of the selection's start and end.

Parameters
[in]selectionStartThe zero-based index of the character at which the selection starts. If set to -1, the current selection is cleared.
[in]selectionEndThe zero-based index of the first unselected character after the end of the selection.
Remarks
To select all text in the control, set selectionStart to 0 and selectionEnd to -1.
See also
GetSelection, ReplaceSelectedText, SelectedText

◆ ShowBalloonTip()

HRESULT ShowBalloonTip ( [in] BSTR  title,
[in] BSTR  text,
[in, defaultvalue(btiNone)] BalloonTipIconConstants  icon,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Displays a balloon tip associated with the control

Parameters
[in]titleThe title of the balloon tip to display.
[in]textThe balloon tip text to display.
[in]iconThe icon of the balloon tip to display. Any of the values defined by the BalloonTipIconConstants enumeration is valid.
Returns
True on success; otherwise False.
Remarks
Requires comctl32.dll version 6.0 or higher.
See also
HideBalloonTip, BalloonTipIconConstants

◆ Undo()

HRESULT Undo ( [out, retval] VARIANT_BOOL *  pSucceeded)

Undoes the last action in the control's undo queue

Returns
True on success; otherwise False.
See also
CanUndo, EmptyUndoBuffer

◆ FinishOLEDragDrop()

HRESULT FinishOLEDragDrop ( void  )

Finishes a pending drop operation

During a drag'n'drop operation the drag image is displayed until the OLEDragDrop event has been handled. This order is intended by Microsoft Windows. However, if a message box is displayed from within the OLEDragDrop event, or the drop operation cannot be performed asynchronously and takes a long time, it may be desirable to remove the drag image earlier.
This method will break the intended order and finish the drag'n'drop operation (including removal of the drag image) immediately.

Remarks
This method will fail if not called from the OLEDragDrop event handler or if no drag images are used.
See also
_ITextBoxEvents::OLEDragDrop, SupportOLEDragImages

Property Documentation

◆ AcceptNumbersOnly

VARIANT_BOOL AcceptNumbersOnly
getset

Specifies whether the control accepts numbers only

Retrieves or sets whether the control accepts all kind of text or only numbers. If set to True, only numbers, otherwise all text is accepted.

See also
Text

◆ AcceptTabKey

VARIANT_BOOL AcceptTabKey
getset

Specifies whether the control processes the [TAB] key

Retrieves or sets whether pressing the [TAB] key inserts a tabulator into the control. If set to True, a tabulator is inserted; otherwise the keyboard focus is transfered to the next control.

See also
TabStops, TabWidth, Text, _ITextBoxEvents::KeyDown

◆ AllowDragDrop

VARIANT_BOOL AllowDragDrop
getset

Specifies whether the control detects drag'n'drop operations

Retrieves or sets whether drag'n'drop mode can be entered. If set to True, drag'n'drop mode can be entered by pressing the left or right mouse button over selected text and then moving the mouse with the button still pressed. If set to False, drag'n'drop mode is not available - this also means the BeginDrag and BeginRDrag events don't get fired.

See also
RegisterForOLEDragDrop, DragScrollTimeBase, SetInsertMarkPosition, _ITextBoxEvents::BeginDrag, _ITextBoxEvents::BeginRDrag

◆ AlwaysShowSelection

VARIANT_BOOL AlwaysShowSelection
getset

Controls how selected text is displayed

Retrieves or sets whether the selected text will be highlighted even if the control doesn't have the focus. If set to True, selected text is drawn as selected if the control does not have the focus; otherwise it's drawn as normal text.

Attention
Changing this property destroys and recreates the control window.
See also
Text

◆ Appearance

AppearanceConstants Appearance
getset

Controls the style of the control's outer border

Retrieves or sets the kind of border that is drawn around the control. Any of the values defined by the AppearanceConstants enumeration except aDefault is valid.

See also
BorderStyle, AppearanceConstants

◆ AutoScrolling

AutoScrollingConstants AutoScrolling
getsetproperty

Controls the control's automatic scrolling features

Retrieves or sets the directions into which the control scrolls automatically, if the caret reaches the borders of the control's client area. Any combination of the values defined by the AutoScrollingConstants enumeration is valid.

Attention
Changing this property destroys and recreates the control window.
See also
ScrollBars, MultiLine, _ITextBoxEvents::TruncatedText, AutoScrollingConstants

◆ BackColor

OLE_COLOR BackColor
getset

Specifies the control's background color

Retrieves or sets the control's background color.

See also
ForeColor, DisabledBackColor

◆ BorderStyle

BorderStyleConstants BorderStyle
getset

Controls the style of the control's inner border

Retrieves or sets the kind of inner border that is drawn around the control. Any of the values defined by the BorderStyleConstants enumeration is valid.

See also
Appearance, BorderStyleConstants

◆ CancelIMECompositionOnSetFocus

VARIANT_BOOL CancelIMECompositionOnSetFocus
getset

Controls the control's IME features

Retrieves or sets whether the control cancels the IME composition string when it receives the focus. If set to True, the composition string is canceled; otherwise not.

See also
IMEMode, CompleteIMECompositionOnKillFocus

◆ CharacterConversion

CharacterConversionConstants CharacterConversion
getset

Controls the control's automatic character conversion features

Retrieves or sets the kind of conversion that is applied to characters that are typed into the control. Any of the values defined by the CharacterConversionConstants enumeration is valid.

See also
DoOEMConversion, Text, CharacterConversionConstants

◆ CompleteIMECompositionOnKillFocus

VARIANT_BOOL CompleteIMECompositionOnKillFocus
getset

Controls the control's IME features

Retrieves or sets whether the control completes the IME composition string when it loses the focus. If set to True, the composition string is completed; otherwise not.

See also
IMEMode, CancelIMECompositionOnSetFocus

◆ CueBanner

BSTR CueBanner
getset

Specifies the control's textual cue

Retrieves or sets the control's textual cue.

Remarks
Due to an bug in Windows XP and Windows Server 2003, cue banners won't work on those systems if East Asian language and complex script support is installed.
Requires comctl32.dll version 6.0 or higher.
See also
Text, DisplayCueBannerOnFocus

◆ DisabledBackColor

OLE_COLOR DisabledBackColor
getset

Specifies the control's background color

Retrieves or sets the color used as the control's background color, if the control is read-only or disabled. If set to -1, the system's default color is used.

See also
Enabled, ReadOnly, DisabledForeColor, BackColor

◆ DisabledEvents

DisabledEventsConstants DisabledEvents
getset

Controls which events are fired

Retrieves or sets the events that won't be fired. Disabling events increases performance. Any combination of the values defined by the DisabledEventsConstants enumeration is valid.

See also
DisabledEventsConstants

◆ DisabledForeColor

OLE_COLOR DisabledForeColor
getsetproperty

Specifies the control's text color

Retrieves or sets the color used as the control's text color, if the control is read-only. If set to -1, the system's default color is used.

Remarks
On current versions of Windows this property has no effect if the control is disabled.
See also
Enabled, ReadOnly, DisabledBackColor, ForeColor

◆ DisplayCueBannerOnFocus

VARIANT_BOOL DisplayCueBannerOnFocus
getset

Controls when the control's textual cue is displayed

Retrieves or sets whether the control's textual cue is displayed if the control has the keyboard focus. If set to True, the textual cue is displayed if the control has the keyboard focus; otherwise not.

Remarks
Due to an bug in Windows XP and Windows Server 2003, cue banners won't work on those systems if East Asian language and complex script support is installed.
Requires comctl32.dll version 6.0 or higher.
See also
CueBanner

◆ DontRedraw

VARIANT_BOOL DontRedraw
getset

Controls redrawing of the control

Enables or disables automatic redrawing of the control. Disabling redraw while doing large changes on the control may increase performance. If set to False, the control will redraw itself automatically; otherwise not.

◆ DoOEMConversion

VARIANT_BOOL DoOEMConversion
getset

Specifies whether the control tries to work-around character set problems related to filenames

Retrieves or sets whether the control's text is converted from the Windows character set to the OEM character set and then back to the Windows character set. Such a conversion ensures proper character conversion when the application calls the CharToOem function to convert a Windows string in the control to OEM characters. This property is most useful if the control contains file names that will be used on file systems that do not support Unicode.
If set to True, the conversion is performed; otherwise not.

See also
CharacterConversion, Text, CharToOem

◆ DragScrollTimeBase

LONG DragScrollTimeBase
getset

Controls the speed of automatic scrolling during drag'n'drop

Retrieves or sets the period of time (in milliseconds) that is used as the time-base to calculate the velocity of auto-scrolling during a drag'n'drop operation. If set to 0, auto-scrolling is disabled. If set to -1, the system's double-click time, divided by 4, is used.

See also
AllowDragDrop, RegisterForOLEDragDrop, _ITextBoxEvents::OLEDragMouseMove

◆ Enabled

VARIANT_BOOL Enabled
getset

Controls whether the control accepts user input

Enables or disables the control for user input. If set to True, it reacts to user input; otherwise not.

See also
ReadOnly

◆ FirstVisibleChar

LONG FirstVisibleChar
getproperty

Retrieves the control's first visible character

Retrieves the zero-based index of the first visible character in a single-line control.

Remarks
This property is read-only.
See also
FirstVisibleLine, GetLineFromChar, MultiLine

◆ FirstVisibleLine

LONG FirstVisibleLine
getproperty

Retrieves the control's first visible line

Retrieves the zero-based index of the uppermost visible line in a multiline control.

Remarks
This property is read-only.
See also
LastVisibleLine, FirstVisibleChar, MultiLine, GetLineCount

◆ Font

IFontDisp Font
getset

Specifies the control's font

Retrieves or sets the control's font. It's used to draw the control's content.

See also
UseSystemFont, ForeColor, Text

◆ ForeColor

OLE_COLOR ForeColor
getset

Specifies the control's text color

Retrieves or sets the control's text color.

See also
BackColor, DisabledForeColor

◆ FormattingRectangleHeight

OLE_YSIZE_PIXELS FormattingRectangleHeight
getsetproperty

Specifies the height of the control's formatting rectangle

Retrieves or sets the height (in pixels) of the control's formatting rectangle.
The visibility of the control's text is governed by the dimensions of its window rectangle and its formatting rectangle. The formatting rectangle is a construct maintained by the system for formatting the text displayed in the window rectangle. When the control is first displayed, the two rectangles are identical on the screen. An application can make the formatting rectangle larger than the window rectangle (thereby limiting the visibility of the control's text) or smaller than the window rectangle (thereby creating extra white space around the text).

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
FormattingRectangleLeft, FormattingRectangleTop, FormattingRectangleWidth, UseCustomFormattingRectangle, MultiLine

◆ FormattingRectangleLeft

OLE_XPOS_PIXELS FormattingRectangleLeft
getsetproperty

Specifies the x-coordinate of the control's formatting rectangle

Retrieves or sets the distance (in pixels) between the left borders of the control's formatting rectangle and its client area.
The visibility of the control's text is governed by the dimensions of its window rectangle and its formatting rectangle. The formatting rectangle is a construct maintained by the system for formatting the text displayed in the window rectangle. When the control is first displayed, the two rectangles are identical on the screen. An application can make the formatting rectangle larger than the window rectangle (thereby limiting the visibility of the control's text) or smaller than the window rectangle (thereby creating extra white space around the text).

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
FormattingRectangleHeight, FormattingRectangleTop, FormattingRectangleWidth, UseCustomFormattingRectangle, MultiLine

◆ FormattingRectangleTop

OLE_YPOS_PIXELS FormattingRectangleTop
getsetproperty

Specifies the y-coordinate of the control's formatting rectangle

Retrieves or sets the distance (in pixels) between the upper borders of the control's formatting rectangle and its client area.
The visibility of the control's text is governed by the dimensions of its window rectangle and its formatting rectangle. The formatting rectangle is a construct maintained by the system for formatting the text displayed in the window rectangle. When the control is first displayed, the two rectangles are identical on the screen. An application can make the formatting rectangle larger than the window rectangle (thereby limiting the visibility of the control's text) or smaller than the window rectangle (thereby creating extra white space around the text).

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
FormattingRectangleHeight, FormattingRectangleLeft, FormattingRectangleWidth, UseCustomFormattingRectangle, MultiLine

◆ FormattingRectangleWidth

OLE_XSIZE_PIXELS FormattingRectangleWidth
getsetproperty

Specifies the width of the control's formatting rectangle

Retrieves or sets the width (in pixels) of the control's formatting rectangle.
The visibility of the control's text is governed by the dimensions of its window rectangle and its formatting rectangle. The formatting rectangle is a construct maintained by the system for formatting the text displayed in the window rectangle. When the control is first displayed, the two rectangles are identical on the screen. An application can make the formatting rectangle larger than the window rectangle (thereby limiting the visibility of the control's text) or smaller than the window rectangle (thereby creating extra white space around the text).

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
FormattingRectangleHeight, FormattingRectangleLeft, FormattingRectangleTop, UseCustomFormattingRectangle, MultiLine

◆ HAlignment

HAlignmentConstants HAlignment
getset

Controls the horizontal alignment of the control's content

Retrieves or sets the horizontal alignment of the control's content. Any of the values defined by the HAlignmentConstants enumeration is valid.

Attention
On Windows XP, changing this property destroys and recreates the control window.
See also
Text, HAlignmentConstants

◆ hDragImageList

OLE_HANDLE hDragImageList
get

Retrieves the imagelist containing the drag image

Retrieves the handle to the imagelist containing the drag image that is used during a drag'n'drop operation to visualize the dragged data.

See also
ShowDragImage, BeginDrag, _ITextBoxEvents::DragMouseMove

◆ HoverTime

LONG HoverTime
getset

Controls when the MouseHover event is fired

Retrieves or sets the number of milliseconds the mouse cursor must be located over the control's client area before the MouseHover event is fired. If set to -1, the system hover time is used.

See also
_ITextBoxEvents::MouseHover

◆ hWnd

OLE_HANDLE hWnd
get

Retrieves the control's window handle

Retrieves the control's window handle.

Remarks
This property is read-only.
See also
_ITextBoxEvents::RecreatedControlWindow, _ITextBoxEvents::DestroyedControlWindow

◆ IMEMode

IMEModeConstants IMEMode
getset

Controls the control's IME features

Retrieves or sets the control's IME mode. IME is a Windows feature making it easy to enter Asian characters. Any of the values defined by the IMEModeConstants enumeration is valid.

See also
CancelIMECompositionOnSetFocus, CompleteIMECompositionOnKillFocus, IMEModeConstants

◆ InsertMarkColor

OLE_COLOR InsertMarkColor
getset

Specifies the color of the control's insertion mark

Retrieves or sets the color that the control's insertion mark is drawn in.

See also
SetInsertMarkPosition

◆ InsertSoftLineBreaks

VARIANT_BOOL InsertSoftLineBreaks
getsetproperty

Controls the control's behavior at line ends

Retrieves or sets whether the control inserts soft line-break characters at the end of lines that are broken because of wordwrapping. A soft line break consists of two carriage returns and a line feed. If set to True, soft line breaks are inserted; otherwise not.

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
Text, MultiLine

◆ LastVisibleLine

LONG LastVisibleLine
getproperty

Retrieves the control's last visible line

Retrieves the zero-based index of the last visible line in a multiline control.

Remarks
This property is read-only.
See also
FirstVisibleLine, MultiLine, GetLineCount

◆ LeftMargin

OLE_XSIZE_PIXELS LeftMargin
getset

Specifies the width of the whitespace to the left of the control's content

Retrieves or sets the width (in pixels) of the control's left margin. If set to -1, a value, that depends on the control's font, is used.

See also
RightMargin, Font

◆ LineHeight

LONG LineHeight
getproperty

Retrieves the text lines' height

Retrieves the height of each text line.

Remarks
This property is read-only.
See also
FirstVisibleLine, LastVisibleLine

◆ MaxTextLength

LONG MaxTextLength
getset

Specifies the maximum length of the input

Retrieves or sets the maximum number of characters, that the user can type into the control. If set to -1, the system's default setting is used.

Remarks
Text, that is set through the Text property may exceed this limit.
See also
TextLength, Text, _ITextBoxEvents::TruncatedText

◆ Modified

VARIANT_BOOL Modified
getset

Retrieves or sets a flag indicating whether the control's content has changed

Retrieves or sets a flag indicating whether the control's content has changed. A value of True stands for changed content, a value of False for unchanged content.

See also
Text, _ITextBoxEvents::ContentChanged

◆ MouseIcon

IPictureDisp MouseIcon
getset

Controls the control's mouse cursor

Retrieves or sets a user-defined mouse cursor. It's used if MousePointer is set to mpCustom.

See also
MousePointer, SelectedTextMouseIcon, MousePointerConstants

◆ MousePointer

MousePointerConstants MousePointer
getset

Controls the control's mouse cursor

Retrieves or sets the cursor's type that's used if the mouse cursor is placed within the control's client area. Any of the values defined by the MousePointerConstants enumeration is valid.

See also
MouseIcon, SelectedTextMousePointer, MousePointerConstants

◆ MultiLine

VARIANT_BOOL MultiLine
getsetproperty

Specifies whether the control displays text in multiple lines

Retrieves or sets whether the control processes carriage returns and displays the content in multiple lines. If set to True, the content is displayed on multiple lines; otherwise not.

Attention
Changing this property destroys and recreates the control window.
See also
Text, ScrollBars, GetLineCount, FirstVisibleLine, LastVisibleLine, HAlignment

◆ OLEDragImageStyle

OLEDragImageStyleConstants OLEDragImageStyle
getset

Specifies the appearance of the OLE drag images generated by the control

Retrieves or sets the appearance of the OLE drag images generated by the control. Any of the values defined by the OLEDragImageStyleConstants enumeration is valid.

See also
SupportOLEDragImages, OLEDrag, OLEDragImageStyleConstants

◆ PasswordChar

SHORT PasswordChar
getsetproperty

Specifies the replacement character for password input fields

Retrieves or sets the code of the character, that is displayed instead of the real characters, if the UsePasswordChar property is set to True. If set to 0, the system's default setting is used.

Remarks
This property is ignored, if the MultiLine property is set to True.
See also
UsePasswordChar, Text, MultiLine

◆ ProcessContextMenuKeys

VARIANT_BOOL ProcessContextMenuKeys
getset

Specifies whether the ContextMenu event can be invoked using the keyboard

Retrieves or sets whether the control fires the ContextMenu event if the user presses [SHIFT]+[F10] or [WINDOWS CONTEXTMENU]. If set to True, the events get fired; otherwise not.

See also
_ITextBoxEvents::ContextMenu

◆ ReadOnly

VARIANT_BOOL ReadOnly
getset

Specifies whether the user can edit the displayed text

Retrieves or sets whether the control accepts user input, that would change the control's content. If set to False, such user input is accepted; otherwise not.

See also
Enabled, Text

◆ RegisterForOLEDragDrop

VARIANT_BOOL RegisterForOLEDragDrop
getset

Controls the control's behavior in drag'n'drop operations

Retrieves or sets whether the control is registered as a target for OLE drag'n'drop. If set to True, the control accepts OLE drag'n'drop actions; otherwise not.

See also
AllowDragDrop, SupportOLEDragImages, _ITextBoxEvents::OLEDragEnter

◆ RightMargin

OLE_XSIZE_PIXELS RightMargin
getset

Specifies the width of the whitespace to the right of the control's content

Retrieves or sets the width (in pixels) of the control's right margin. If set to -1, a value, that depends on the control's font, is used.

See also
LeftMargin, Font

◆ RightToLeft

RightToLeftConstants RightToLeft
getset

Controls the control's right-to-left features

Enables or disables bidirectional features. Any combination of the values defined by the RightToLeftConstants enumeration is valid.

Attention
On Windows XP, changing this property destroys and recreates the control window.
See also
IMEMode, _ITextBoxEvents::WritingDirectionChanged, RightToLeftConstants

◆ ScrollBars

ScrollBarsConstants ScrollBars
getset

Specifies the scrollbars to show

Retrieves or sets the scrollbars to show. Any combination of the values defined by the ScrollBarsConstants enumeration is valid.

See also
AutoScrolling, MultiLine, Scroll, _ITextBoxEvents::Scrolling, ScrollBarsConstants

◆ SelectedText

BSTR SelectedText
getproperty

Retrieves the currently selected text

Remarks
This property is read-only.
See also
GetSelection, SetSelection, ReplaceSelectedText, Text

◆ SelectedTextMouseIcon

IPictureDisp SelectedTextMouseIcon
getset

Controls the control's mouse cursor

Retrieves or sets a user-defined mouse cursor. It's used if SelectedTextMousePointer is set to mpCustom and the mouse cursor is located over selected text.

See also
SelectedTextMousePointer, MouseIcon, MousePointerConstants

◆ SelectedTextMousePointer

MousePointerConstants SelectedTextMousePointer
getset

Controls the control's mouse cursor

Retrieves or sets the cursor's type that's used if the mouse cursor is placed within the control's client area over selected text. Any of the values defined by the MousePointerConstants enumeration is valid.

See also
SelectedTextMouseIcon, MousePointer, MousePointerConstants

◆ ShowDragImage

VARIANT_BOOL ShowDragImage
getset

Controls the visibility of the control's drag image

Retrieves or sets whether the drag image is currently visible or hidden. If set to True, it is visible; otherwise it is hidden.

See also
hDragImageList, SupportOLEDragImages, _ITextBoxEvents::DragMouseMove

◆ SupportOLEDragImages

VARIANT_BOOL SupportOLEDragImages
getset

Controls the control's behavior in drag'n'drop operations

Retrieves or sets whether the control creates an IDropTargetHelper object, so that a drag image can be displayed during OLE drag'n'drop. If set to True, the control creates the object; otherwise not.

Remarks
Requires shell32.dll version 5.0 or higher.
See also
RegisterForOLEDragDrop, ShowDragImage, OLEDragImageStyle, FinishOLEDragDrop, IDropTargetHelper

◆ TabStops

VARIANT TabStops
getsetproperty

Specifies the control's tab stops

Retrieves or sets the positions (in pixels) of the control's tab stops. The property expects a Variant containing an array of integer values, each specifying a tab stop's position.

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
AcceptTabKey, TabWidth

◆ TabWidth

OLE_XSIZE_PIXELS TabWidth
getsetproperty

Specifies the width of a tab

Retrieves or sets the distance (in pixels) between 2 tab stops. If set to -1, the system's default value is used.

Remarks
This property is ignored, if the MultiLine property is set to False.
This property is ignored, if the TabStops property is not set to Empty.
See also
AcceptTabKey, TabStops

◆ Text

BSTR Text
getset

Specifies the control's content

Retrieves or sets the control's content.

Remarks
This is the control's default property.
See also
TextLength, MaxTextLength, GetLine, AcceptNumbersOnly, PasswordChar, CueBanner, HAlignment, MultiLine, ForeColor, Font, _ITextBoxEvents::TextChanged

◆ TextLength

LONG TextLength
getproperty

Retrieves the length of the text

Retrieves the length of the text specified by the Text property.

Remarks
This property is read-only.
See also
MaxTextLength, Text

◆ UseCustomFormattingRectangle

VARIANT_BOOL UseCustomFormattingRectangle
getsetproperty

Controls which formatting rectangle the control is using

Retrieves or sets whether the control uses the formatting rectangle defined by the FormattingRectangle* properties.
The visibility of the control's text is governed by the dimensions of its window rectangle and its formatting rectangle. The formatting rectangle is a construct maintained by the system for formatting the text displayed in the window rectangle. When an edit control is first displayed, the two rectangles are identical on the screen. An application can make the formatting rectangle larger than the window rectangle (thereby limiting the visibility of the control's text) or smaller than the window rectangle (thereby creating extra white space around the text).
If this property is set to False, the formatting rectangle is set to its default values. Otherwise it's defined by the FormattingRectangle* properties.

Remarks
This property is ignored, if the MultiLine property is set to False.
See also
FormattingRectangleHeight, FormattingRectangleLeft, FormattingRectangleTop, FormattingRectangleWidth, MultiLine

◆ UsePasswordChar

VARIANT_BOOL UsePasswordChar
getsetproperty

Specifies whether the control's content is automatically replaced to hide it

Retrieves or sets whether the control hides user input by (visually) replacing each character with the character specified by the PasswordChar property. If set to True, user input is (visually) replaced; otherwise not.

Remarks
This property is ignored, if the MultiLine property is set to True.
See also
PasswordChar, Text, MultiLine

◆ UseSystemFont

VARIANT_BOOL UseSystemFont
getsetproperty

Specifies whether the control uses the system font

Retrieves or sets whether the control uses the MS Shell Dlg font (which is mapped to the system's default GUI font) or the font specified by the Font property. If set to True, the system font; otherwise the specified font is used.

See also
Font

◆ Version

BSTR Version
get

Retrieves the control's version

Remarks
This property is read-only.

◆ WordBreakFunction

LONG WordBreakFunction
getset

Controls word processing

Retrieves or sets the function that is responsible to tell the control where a word starts and where it ends. This property takes the address of a function having the following signature:

FindWorkBreak(ByVal pText As Long, ByVal startPosition As Long, ByVal textLength As Long, ByVal flags As Long) As Long

The pText argument is a pointer to the control's text. In ANSI builds of the control, this text is encoded in ANSI; otherwise it's encoded in Unicode.
The startPosition argument specifies the (zero-based) position within the text, at which the function should begin checking for a word break.
The textLength argument specifies the length of the text pointed to by pText in characters.
The flags argument specifies the action to be taken by the function. This can be one of the following values:

  • WB_ISDELIMITER Check whether the character at the specified position is a delimiter.
  • WB_LEFT Find the beginning of a word to the left of the specified position.
  • WB_RIGHT Find the beginning of a word to the right of the specified position. This is useful in right-aligned edit controls.

If the flags parameter specifies WB_ISDELIMITER and the character at the specified position is a delimiter, the function must return a non-zero value.
If the flags parameter specifies WB_ISDELIMITER and the character at the specified position is not a delimiter, the function must return zero.
If the flags parameter specifies WB_LEFT or WB_RIGHT, the function must return the (zero-based) index to the beginning of a word in the specified text.

If this property is set to 0, the system's internal function is used.

See also
Text, HAlignment, EditWordBreakProc