TimoSoft EditControls  1.7.0.151
ITextBox Interface Reference

The main interface More...

List of all members.

Public Member Functions

HRESULT About (void)
 Displays the control's credits
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
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
HRESULT CanUndo ([out, retval] VARIANT_BOOL *pValue)
 Determines whether there are any actions in the control's undo queue
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
HRESULT EmptyUndoBuffer (void)
 Clears the control's undo queue
HRESULT EndDrag ([in] VARIANT_BOOL abort)
 Exits drag'n'drop mode
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
HRESULT GetDraggedTextRange ([in, out, defaultvalue(0)] LONG *draggedTextFirstChar,[in, out, defaultvalue(0)] LONG *draggedTextLastChar)
 Retrieves the dragged text's start and end
HRESULT GetFirstCharOfLine ([in] LONG lineIndex,[out, retval] LONG *pValue)
 Retrieves the zero-based index of the first character of the specified line
HRESULT GetInsertMarkPosition ([in, out] InsertMarkPositionConstants *relativePosition,[in, out] LONG *characterIndex)
 Retrieves the position of the control's insertion mark
HRESULT GetLine ([in] LONG lineIndex,[out, retval] BSTR *pValue)
 Retrieves the text of the specified line
HRESULT GetLineCount ([out, retval] LONG *pValue)
 Retrieves the number of lines in the control
HRESULT GetLineFromChar ([in] LONG characterIndex,[out, retval] LONG *pValue)
 Retrieves the zero-based index of the line that contains the specified character
HRESULT GetLineLength ([in] LONG lineIndex,[out, retval] LONG *pValue)
 Retrieves the number of characters in the specified line
HRESULT GetSelection ([in, out, defaultvalue(0)] LONG *selectionStart,[in, out, defaultvalue(0)] LONG *selectionEnd)
 Retrieves the current selection's start and end
HRESULT HideBalloonTip ([out, retval] VARIANT_BOOL *pSucceeded)
 Hides any balloon tips associated with the control
HRESULT IsTextTruncated ([in, defaultvalue(0)] LONG lineIndex,[out, retval] VARIANT_BOOL *pValue)
 Determines whether the specified line's text is entirely visible or truncated
HRESULT LoadSettingsFromFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Loads the control's settings from the specified file
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
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
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
HRESULT SaveSettingsToFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Saves the control's settings to the specified file
HRESULT Scroll ([in] ScrollAxisConstants axis,[in] ScrollDirectionConstants directionAndIntensity,[in, defaultvalue(0)] LONG linesToScrollVertically,[in, defaultvalue(0)] LONG charactersToScrollHorizontally)
 Scrolls the control
HRESULT ScrollCaretIntoView (void)
 Scrolls the control so that the caret is visible
HRESULT SetInsertMarkPosition ([in] InsertMarkPositionConstants relativePosition,[in] LONG characterIndex)
 Sets the position of the control's insertion mark
HRESULT SetSelection ([in] LONG selectionStart,[in] LONG selectionEnd)
 Sets the selection's start and end
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
HRESULT Undo ([out, retval] VARIANT_BOOL *pSucceeded)
 Undoes the last action in the control's undo queue

Properties

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

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

HRESULT About ( void  )

Displays the control's credits

Displays some information about this control and its author.

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
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
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
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
HRESULT EmptyUndoBuffer ( void  )

Clears the control's undo queue

See also:
CanUndo, Undo
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
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
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
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
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
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
HRESULT GetLineCount ( [out, retval] LONG *  pValue)

Retrieves the number of lines in the control

Returns:
The number of lines.
See also:
FirstVisibleLine, LastVisibleLine, MultiLine
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, SelectionStart
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
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
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
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
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
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
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
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
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
HRESULT Scroll ( [in] ScrollAxisConstants  axis,
[in] ScrollDirectionConstants  directionAndIntensity,
[in, defaultvalue(0)] LONG  linesToScrollVertically,
[in, defaultvalue(0)] LONG  charactersToScrollHorizontally 
)

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
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
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
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
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
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

Property Documentation

VARIANT_BOOL AcceptNumbersOnly [get, set]

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
VARIANT_BOOL AcceptTabKey [get, set]

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
VARIANT_BOOL AllowDragDrop [get, set]

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
VARIANT_BOOL AlwaysShowSelection [get, set]

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
AppearanceConstants Appearance [get, set]

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
AutoScrollingConstants AutoScrolling [get, set]

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
OLE_COLOR BackColor [get, set]

Specifies the control's background color

Retrieves or sets the control's background color.

See also:
ForeColor, DisabledBackColor
BorderStyleConstants BorderStyle [get, set]

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
VARIANT_BOOL CancelIMECompositionOnSetFocus [get, set]

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
CharacterConversionConstants CharacterConversion [get, set]

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
VARIANT_BOOL CompleteIMECompositionOnKillFocus [get, set]

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
BSTR CueBanner [get, set]

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
OLE_COLOR DisabledBackColor [get, set]

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
DisabledEventsConstants DisabledEvents [get, set]

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
OLE_COLOR DisabledForeColor [get, set]

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
VARIANT_BOOL DisplayCueBannerOnFocus [get, set]

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
VARIANT_BOOL DontRedraw [get, set]

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.

VARIANT_BOOL DoOEMConversion [get, set]

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
LONG DragScrollTimeBase [get, set]

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
VARIANT_BOOL Enabled [get, set]

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
LONG FirstVisibleChar [get]

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
LONG FirstVisibleLine [get]

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
IFontDisp Font [get, set]

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
OLE_COLOR ForeColor [get, set]

Specifies the control's text color

Retrieves or sets the control's text color.

See also:
BackColor, DisabledForeColor
OLE_YSIZE_PIXELS FormattingRectangleHeight [get, set]

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
OLE_XPOS_PIXELS FormattingRectangleLeft [get, set]

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
OLE_YPOS_PIXELS FormattingRectangleTop [get, set]

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
OLE_XSIZE_PIXELS FormattingRectangleWidth [get, set]

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
HAlignmentConstants HAlignment [get, set]

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
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
LONG HoverTime [get, set]

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
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
IMEModeConstants IMEMode [get, set]

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
OLE_COLOR InsertMarkColor [get, set]

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
VARIANT_BOOL InsertSoftLineBreaks [get, set]

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
LONG LastVisibleLine [get]

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
OLE_XSIZE_PIXELS LeftMargin [get, set]

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
LONG LineHeight [get]

Retrieves the text lines' height

Retrieves the height of each text line.

Remarks:
This property is read-only.
See also:
FirstVisibleLine, LastVisibleLine
LONG MaxTextLength [get, set]

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
VARIANT_BOOL Modified [get, set]

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
IPictureDisp MouseIcon [get, set]

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
MousePointerConstants MousePointer [get, set]

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
VARIANT_BOOL MultiLine [get, set]

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
OLEDragImageStyleConstants OLEDragImageStyle [get, set]

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
SHORT PasswordChar [get, set]

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
VARIANT_BOOL ProcessContextMenuKeys [get, set]

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
VARIANT_BOOL ReadOnly [get, set]

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
VARIANT_BOOL RegisterForOLEDragDrop [get, set]

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
OLE_XSIZE_PIXELS RightMargin [get, set]

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
RightToLeftConstants RightToLeft [get, set]

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
ScrollBarsConstants ScrollBars [get, set]

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
BSTR SelectedText [get]

Retrieves the currently selected text

Remarks:
This property is read-only.
See also:
GetSelection, SetSelection, ReplaceSelectedText, Text
IPictureDisp SelectedTextMouseIcon [get, set]

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
MousePointerConstants SelectedTextMousePointer [get, set]

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
VARIANT_BOOL ShowDragImage [get, set]

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
VARIANT_BOOL SupportOLEDragImages [get, set]

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, IDropTargetHelper
VARIANT TabStops [get, set]

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
OLE_XSIZE_PIXELS TabWidth [get, set]

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
BSTR Text [get, set]

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
LONG TextLength [get]

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
VARIANT_BOOL UseCustomFormattingRectangle [get, set]

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
VARIANT_BOOL UsePasswordChar [get, set]

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
VARIANT_BOOL UseSystemFont [get, set]

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
BSTR Version [get]

Retrieves the control's version

Remarks:
This property is read-only.
LONG WordBreakFunction [get, set]

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