Edit Library v1.1 | |
Introduction | This library is designed for use on the standard edit control. |
Issues/ | A few considerations... |
Credit | This library was inspired by the Edit mini-library created by Lexikos and the HiEditor library created by majkinetor. |
Functions | |
Edit_CanUndo | Returns TRUE if there are any actions in the edit control’s undo queue, otherwise FALSE. |
Edit_CharFromPos | Gets information about the character and/or line closest to a specified point in the the client area of the edit control. |
Edit_Clear | Delete (clear) the current selection, if any, from the edit control. |
Edit_Convert2DOS | Converts Unix, DOS/Unix mix, and Mac file formats to DOS format. |
Edit_Convert2Mac | Convert DOS, DOS/Unix mix, and Unix file formats to Mac format. |
Edit_Convert2Unix | Convert DOS, DOS/Unix mix, and Mac formats to Unix format. |
Edit_ConvertCase | Convert case of selected text. |
Edit_Copy | Copy the current selection to the clipboard in CF_TEXT format. |
Edit_Cut | Delete the current selection, if any, and copy the deleted text to the clipboard in CF_TEXT format. |
Edit_EmptyUndoBuffer | Resets the undo flag of the edit control. |
Edit_FindText | Find text within the edit control. |
Edit_FmtLines | Sets a flag that determines whether a multiline edit control includes soft line-break characters. |
Edit_GetFirstVisibleLine | Returns the zero-based index of the uppermost visible line. |
Edit_GetLastVisibleLine | Returns the zero-based line index of the last visible line on the edit control. |
Edit_GetLimitText | Returns the current text limit for the edit control. |
Edit_GetLine | Get the text of the desired line from the edit control. |
Edit_GetLineCount | Returns an integer specifying the total number of text lines in a multiline edit control. |
Edit_GetMargins | Gets the widths of the left and right margins for the edit control. |
Edit_GetModify | Gets the state of the edit control’s modification flag. |
Edit_GetRect | Gets the formatting rectangle of the edit control. |
Edit_GetSel | Gets the starting and ending character positions of the current selection in the edit control. |
Edit_GetSelText | Returns the currently selected text (if any). |
Edit_GetText | Returns all text from the control up to p_Length length. |
Edit_GetTextLength | Returns the length, in characters, of the text in the edit control. |
Edit_GetTextRange | Get a range of characters. |
Edit_IsMultiline | Returns TRUE if the edit control is multiline, otherwise FALSE. |
Edit_IsReadOnly | Returns TRUE if the ES_READONLY style has been set, otherwise FALSE. |
Edit_IsStyle | Returns TRUE if the specified style has been set, otherwise FALSE. |
Edit_SetStyle | Adds, removes, or toggles a style for an edit control. |
Edit_LineFromChar | Gets the index of the line that contains the specified character index. |
Edit_LineFromPos | This function is the same as Edit_CharFromPos except the line index (r_LineIdx) is returned. |
Edit_LineIndex | Gets the character index of the first character of a specified line. |
Edit_LineLength | Gets the length of a line. |
Edit_LineScroll | Scrolls the text in the edit control for the current file. |
Edit_LoadFile | Load the contents of a file to the edit control. |
Edit_Paste | Copies the current content of the clipboard to the edit control at the current caret position. |
Edit_PosFromChar | Gets the client area coordinates of a specified character in the edit control. |
Edit_ReplaceSel | Replaces the selected text with the specified text. |
Edit_SaveFile | Save the contents of the edit control to a file. |
Edit_Scroll | Scrolls the text vertically in the edit control. |
Edit_ScrollCaret | Scrolls the edit control until caret is visible. |
Edit_SetLimitText | Sets the text limit of the edit control. |
Edit_SetMargins | Sets the width of the left and/or right margin (in pixels) for the edit control. |
Edit_SetModify | Sets or clears the modification flag for the edit control. |
Edit_SetPasswordChar | Sets or removes the password character for a single-line edit control. |
Edit_SetReadOnly | Sets or removes the read-only style (ES_READONLY) of the edit control. |
Edit_SetRect | Sets the formatting rectangle of a multiline edit control. |
Edit_SetTabStops | Sets the tab stops in a multiline edit control. |
Edit_SetText | Set the text of the edit control. |
Edit_SetSel | Selects a range of characters. |
Edit_TextIsSelected | Returns TRUE if text is selected, otherwise FALSE. |
Edit_Undo | Undo the last operation. |
Edit_GetActiveHandles | Finds the handles for the active control and active window. |
A few considerations...
Edit_CharFromPos( hEdit, X, Y, ByRef r_CharPos = "", ByRef r_LineIdx = "" )
Gets information about the character and/or line closest to a specified point in the the client area of the edit control.
X, Y | The coordinates of a point in the edit control’s client area relative to the upper-left corner of the client area. |
r_CharPos | The zero-based index of the character nearest the specified point. [Optional] This index is relative to the beginning of the control, not the beginning of the line. If the specified point is beyond the last character in the edit control, the return value indicates the last character in the control. See the Remarks section for more information. |
r_LineIdx | Zero-based index of the line that contains the character. [Optional] For single-line edit controls, this value is zero. The index indicates the line delimiter if the specified point is beyond the last visible character in a line. See the Remarks section for more information. |
The value of the r_CharPos variable.
If the specified point is outside the bounds of the edit control, all output variables (Return, r_CharPos, and r_LineIdx) are set to -1.
Edit_FindText( hEdit, p_SearchText, p_Min = 0, p_Max = -1, p_Flags = "", ByRef r_RegExOut = "" )
Find text within the edit control.
p_SearchText | Search text. |
p_Min, p_Max | Zero-based search range within the edit control. p_Min is the character index of the first character in the range and p_Max is the character index immediately following the last character in the range. (Ex: To search the first 5 characters of the text, set p_Min to 0 and p_Max to 5) Set p_Max to -1 to search to the end of the text. To search backward, the roles and descriptions of the p_Min and p_Max are reversed. (Ex: To search the first 5 characters of the control in reverse, set p_Min to 5 and p_Max to 0) |
p_Flags | Valid flags are as follows: |
Flag Description ---- ----------- MatchCase Search is case sensitive. This flag is ignored if the "RegEx" flag is also defined. RegEx Regular expression search. Static [Advanced feature] Text collected from the edit control remains in memory is used to satisfy the search request. The text remains in memory until the "Reset" flag is used or until the "Static" flag is not used. Advantages: Search time is reduced 10 to 60 percent (or more) depending on the size of the text in the control. There is no speed increase on the first use of the "Static" flag. Disadvantages: Any changes in the edit control are not reflected in the search. Bottom line: Don't use this flag unless performing multiple search requests on a control that will not be modified while searching. Reset [Advanced feature] Clears the saved text created by the "Static" flag so that the next use of the "Static" flag will get the text directly from the edit control. To clear the saved memory without performing a search, use the following syntax: Edit_FindText("","",0,0,"Reset")
r_RegExOutput | Variable that contains the part of the source text that matched the RegEx pattern. [Optional] |
Zero-based character index of the first character of the match or -1 if no match is found.
Searching using regular expressions (RegEx) can produce results that have a dynamic number of characters. For this reason, searching for the “next” pattern (forward or backward) may produce different results from developer developer depending on how values of p_Min and p_Max are determined.
Edit_FmtLines( hEdit, p_Flag )
Sets a flag that determines whether a multiline edit control includes soft line-break characters. A soft line break consists of two carriage returns and a line feed and is inserted at the end of a line that is broken because of word wrapping.
p_Flag | Set to TRUE to insert soft line-break characters characters, FALSE to removes them. |
The value of p_Flag.
This message has no effect on the display of the text within the edit control. It affects the buffer returned by the EM_GETHANDLE message and the text returned by the WM_GETTEXT message. Since the WM_GETTEXT message is used by other functions in this library, be sure to un-format the text as soon as possible. Example of use:
Edit_FmtLines(hEdit,True) FormattedText:=Edit_GetText(hEdit) Edit_FmtLines(hEdit,False)
Edit_GetLine( hEdit, p_LineIdx = -1, p_Length = -1 )
Get the text of the desired line from the edit control.
p_LineIdx | The zero-based index of the line to retrieve. [Optional] Use -1 (the default) to get the current line. This parameter is ignored if used for a single-line edit control. |
p_Length | Length of the line or length of the text to be extracted. [Optional] Use -1 (the default) to automatically determine the length of the line. |
The text of the specified line. The return value is an empty string if the line number specified by the p_LineIdx parameter is greater than the number of lines in the Edit control.
Edit_GetLineCount( hEdit )
Returns an integer specifying the total number of text lines in a multiline edit control. If the control has no text, the return value is 1. The return value will never be less than 1.
The value returned is for the number of lines in the edit control. Very long lines (>1024) or word wrap may introduce additional lines to the control.
Edit_GetMargins( hEdit, ByRef r_LeftMargin = "", ByRef r_RightMargin = "" )
Gets the widths of the left and right margins for the edit control. If defined, these values are returned in the r_LeftMargin and r_RightMargin variables.
r_LeftMargin | Left margin, in pixels. [Optional] |
r_RightMargin | Right margin, in pixels. [Optional] |
The edit control’s left margin
Edit_GetSel( hEdit, ByRef r_StartSelPos = "", ByRef r_EndSelPos = "" )
Gets the starting and ending character positions of the current selection in the edit control. If defined, these values are returned in the r_StartSelPos and r_EndSelPos variables.
r_StartSelPos | Starting position of the selection. [Optional] |
r_EndSelPos | Ending position of the selection. [Optional] |
Starting position of the selection.
Edit_GetText( hEdit, p_Length = -1 )
Returns all text from the control up to p_Length length. If p_Length=-1 (the default), all text is returned.
This function is similar to the AutoHotkey GUIControlGet command (for AHK GUI’s) and the ControlGetText command except that end-of-line (EOL) characters from the retrieved text are not automatically converted (CR+LF to LF). If needed, use the Edit_Convert2Unix function to convert the text to the AutoHotkey text format.
Edit_GetTextRange( hEdit, p_Min = 0, p_Max = -1 )
Get a range of characters.
p_Min | Character position index immediately preceding the first character in the range. |
p_Max | Character position immediately following the last character in the range. Set to -1 to indicate the end of the text. |
Since the edit control does not support the EM_GETTEXTRANGE message, the Edit_GetText function (WM_GETTEXT message) is used to collect the desired range of characters.
Edit_IsStyle( hEdit, p_Style )
Returns TRUE if the specified style has been set, otherwise FALSE.
p_Style | Style of the edit control. |
Some common edit control styles...
ES_LEFT :=0x0 ;-- Can't actually check this style. It's the lack of ES_CENTER or ES_RIGHT. ES_CENTER :=0x1 ES_RIGHT :=0x2 ES_MULTILINE :=0x4 ES_UPPERCASE :=0x8 ES_LOWERCASE :=0x10 ES_PASSWORD :=0x20 ;-- Single-line edit control only ES_AUTOVSCROLL:=0x40 ES_AUTOHSCROLL:=0x80 ES_NOHIDESEL :=0x100 ES_COMBO :=0x200 ES_OEMCONVERT :=0x400 ES_READONLY :=0x800 ES_WANTRETURN :=0x1000 ES_NUMBER :=0x2000 WS_TABSTOP :=0x10000 WS_HSCROLL :=0x100000 WS_VSCROLL :=0x200000
Edit_SetStyle( hEdit, p_Style, p_Option = "+" )
Adds, removes, or toggles a style for an edit control.
p_Style | Style to set. |
p_Option | Use “+” (the default) to add, “-” to remove, and “^” to toggle. |
TRUE if the request completed successfully, otherwise FALSE.
Styles that can be modified after the edit control has been created include the following:
ES_UPPERCASE :=0x8 ES_LOWERCASE :=0x10 ES_PASSWORD :=0x20 ;-- Use the Edit_SetPasswordChar function ES_OEMCONVERT :=0x400 ES_READONLY :=0x800 ;-- Use the Edit_SetReadOnly function ES_WANTRETURN :=0x1000 ES_NUMBER :=0x2000
Use the Edit_IsStyle function to determine if a style is currently set.
Edit_LineFromChar( hEdit, p_CharPos = -1 )
Gets the index of the line that contains the specified character index.
p_CharPos | The character index of the character contained in the line whose number is to be retrieved. [Optional] If –1 (the default), the function retrieves either the line number of the current line (the line containing the caret) or, if there is a selection, the line number of the line containing the beginning of the selection. |
The zero-based line number of the line containing the character index specified by p_CharPos.
Edit_LineFromPos( hEdit, X, Y, ByRef r_CharPos = "", ByRef r_LineIdx = "" )
This function is the same as Edit_CharFromPos except the line index (r_LineIdx) is returned.
Edit_LineIndex( hedit, p_LineIdx = -1 )
Gets the character index of the first character of a specified line.
p_LineIdx | Zero-based line number. [Optional] Use -1 (the default) for the current line. |
The character index of the specified line or -1 if the specified line is greater than the total number of lines in the edit control.
Edit_LineLength( hEdit, p_LineIdx = -1 )
Gets the length of a line.
p_LineIdx | The zero-based line index of the desired line. Use -1 (the default) for the current line. |
The length, in characters, of the specified line. If p_LineIndex is greater than the total number of lines in the edit control, the length of the last (or only) line is returned.
Edit_LineScroll( hEdit, xScroll = 0, yScroll = 0 )
Scrolls the text in the edit control for the current file.
xScroll | The number of characters to scroll horizontally. Use a negative number to scroll to the left and a positive number to scroll to the right. |
yScroll | The number of lines to scroll vertically. Use a negative number to scroll up and a positive number to scroll down. |
TRUE if sent to a multiline edit control, otherwise FALSE.
Edit_LoadFile( hEdit, p_FileName, p_Convert2DOS = False, ByRef r_FileFormat = "" )
Load the contents of a file to the edit control.
p_FileName | The full path and name of the file. |
p_Convert2DOS | If TRUE, the text will be converted from Unix, DOS/Unix mix, or Mac format, to DOS format before it is loaded to the edit control. [Optional] |
r_FileFormat | Contains the file format variable. [Optional] This variable |
is set to the file format of loaded file | ”DOS”, “Unix”, or “Mac”. This information is useful if the contents of the edit control will be be converted back to the original file format when the file is saved. |
TRUE if successful, otherwise FALSE.
This request will replace the entire edit control with the contents of the the requested file. Consequently, the Undo buffer is flushed.
Edit_PosFromChar( hEdit, p_CharPos, ByRef X, ByRef Y )
Gets the client area coordinates of a specified character in the edit control.
p_CharPos | The zero-based index of the character. |
X, Y | These parameters, which must contain valid variable names, are used to return the x/y-coordinates of a point in the Edit control’s client relative to the upper-left corner of the client area. |
If p_CharPos is greater than the index of the last character in the control, the returned coordinates are of the position just past the last character of the control.
Edit_ReplaceSel( hEdit, p_Text = "", p_CanUndo = True )
Replaces the selected text with the specified text. If there is no selection, the replacement text is inserted at the caret.
p_Text | Text to replace selection with. |
p_CanUndo | If TRUE (the default), replace can be undone. |
Edit_SaveFile( hEdit, p_FileName, p_Convert = "" )
Save the contents of the edit control to a file. If the file does not exist, it will be created.
p_FileName | The full path and name of the file. |
p_Convert | Convert file format. [Optional] Set to “M” or “Mac” to convert to Mac. Set to “U” or “Unix” to convert to Unix. |
TRUE if successful, otherwise FALSE.
Edit_Scroll( hEdit, p_Pages = 0, p_Lines = 0 )
Scrolls the text vertically in the edit control.
p_Pages | The number of pages to scroll. Use a negative number to scroll up and a positive number to scroll down. |
p_Lines | The number of lines to scroll. Use a negative number to scroll up and a positive number to scroll down. |
The number of lines that the command scrolls. The value will be negative if scrolling up and positive if scrolling down.
Edit_SetLimitText( hEdit, p_Limit )
Sets the text limit of the edit control.
p_Limit | The maximum number of characters the user can enter. Windows NT+: If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or –1 for multiline edit controls. |
http://msdn.microsoft.com
Edit_SetMargins( hEdit, p_LeftMargin = "", p_RightMargin = "" )
Sets the width of the left and/or right margin (in pixels) for the edit control. The message automatically redraws the control to reflect the new margins.
p_LeftMargin | Left margin, in pixels. If blank, the left margin is not set. Specify the EC_USEFONTINFO value (0xFFFF or 65535) to set the left margin to a narrow width calculated using the text metrics of the control’s current font. If no font has been set for the control, the margin is set to zero. |
p_RightMargin | Right margin, in pixels. If blank, the right margin is not set. Specify the EC_USEFONTINFO value (0xFFFF or 65535) to set the right margin to a narrow width calculated using the text metrics of the control’s current font. If no font has been set for the control, the margin is set to zero. |
Edit_SetModify( hEdit, p_Flag )
Sets or clears the modification flag for the edit control. The modification flag indicates whether the text within the control has been modified.
p_Flag | Set to TRUE to set the modification flag. Set to FALSE to clear the modification flag. |
Edit_SetPasswordChar( hEdit, p_Char = "*" )
Sets or removes the password character for a single-line edit control.
p_Char | The character that is displayed in place of the characters typed by the user. [Optional] The default is an asterisk (“*”). Set to null (“”) to remove the password character. |
Documented: This message does not return a value. Undocumented and/or does not apply to all OS versions: Returns TRUE if successful or “FAIL” if unsuccessful.
Edit_SetReadOnly( hEdit, p_Flag )
Sets or removes the read-only style (ES_READONLY) of the edit control.
p_Flag | Set to TRUE to add the ES_READONLY style. Set to FALSE to remove the ES_READONLY style. |
TRUE if successful, otherwise FALSE.
For AutoHotkey GUIs, this is same as using the +ReadOnly or -ReadOnly option when creating the Edit control or using the GUIControl command after the edit control has been created. For example:
GUIControl +ReadOnly,Edit1
Edit_SetRect( hEdit, p_Left, p_Top, p_Right, p_Bottom )
Sets the formatting rectangle of a multiline edit control. The formatting rectangle is the limiting rectangle into which the control draws the text. The limiting rectangle is independent of the size of the edit control window.
p_Left..p_Bottom | Coordinates. |
Advanced feature. For additional information, see the following...
http://msdn.microsoft.com
Edit_SetTabStops( hEdit, p_NbrOfTabStops = 0, p_DTU = 32 )
Sets the tab stops in a multiline edit control. When text is copied to the control, any tab character in the text causes space to be generated up to the next tab stop.
p_NbrOfTabStops | Number of tab stops. [Optional] Set to 0 (the default) to set the tab stops to the system default. Set to 1 to have all tab stops set to the value of the p_DTU parameter or 32 if p_DTU is not defined. Any value greater than 1 will set that number of tab stops. |
p_DTU | Dialog Template Units. [Optional] If p_NbrOfTabStops=0, this parameter is ignored. If this parameter contains a single value (Ex: 21), all tab stops will be set to a factor of this value (Ex: 21, 42, 63, etc.). Otherwise, this parameter should contain values for all requested tab stops each separated by a comma “,” (Ex: “20,45,70,125”). |
TRUE if all the tabs are set, otherwise FALSE.
Edit_SetText( hEdit, p_Text )
Set the text of the edit control. Returns TRUE if successful, otherwise FALSE.
Edit_SetSel( hEdit, p_StartSelPos = 0, p_EndSelPos = -1 )
Selects a range of characters.
p_StartSelPos | Starting character position of the selection. If set to -1, the current selection (if any) will be deselected. |
p_EndSelPos | Ending character position of the selection. Set to -1 to use the position of the last character in the control. |
Edit_Undo( hEdit )
Undo the last operation. Returns TRUE if the Undo operation succeeds, otherwise FALSE.
For a single-line edit control, the return value is always TRUE. For a multiline edit control, the return value is TRUE if the undo operation is successful, otherwise FALSE.
Edit_GetActiveHandles( ByRef hEdit = "", ByRef hWindow = "", p_MsgBox = False )
Finds the handles for the active control and active window.
hEdit | Variable that contains the handle of the active edit control. [Optional] Value is zero if the active control is not an edit control. |
hWindow | Variable that contains the handle of the active window. [Optional] |
p_MsgBox | Display error message. [Optional] If TRUE, an error MsgBox is displayed if the active control is not an edit control. |
Handle of the active edit control or FALSE (0) if the active control is not an edit control.
Returns TRUE if there are any actions in the edit control’s undo queue, otherwise FALSE.
Edit_CanUndo( hEdit )
Gets information about the character and/or line closest to a specified point in the the client area of the edit control.
Edit_CharFromPos( hEdit, X, Y, ByRef r_CharPos = "", ByRef r_LineIdx = "" )
Delete (clear) the current selection, if any, from the edit control.
Edit_Clear( hEdit )
Converts Unix, DOS/Unix mix, and Mac file formats to DOS format.
Edit_Convert2DOS( p_Text )
Convert DOS, DOS/Unix mix, and Unix file formats to Mac format.
Edit_Convert2Mac( p_Text )
Convert DOS, DOS/Unix mix, and Mac formats to Unix format.
Edit_Convert2Unix( p_Text )
Convert case of selected text.
Edit_ConvertCase( hEdit, p_Case )
Copy the current selection to the clipboard in CF_TEXT format.
Edit_Copy( hEdit )
Delete the current selection, if any, and copy the deleted text to the clipboard in CF_TEXT format.
Edit_Cut( hEdit )
Resets the undo flag of the edit control.
Edit_EmptyUndoBuffer( hEdit )
Find text within the edit control.
Edit_FindText( hEdit, p_SearchText, p_Min = 0, p_Max = -1, p_Flags = "", ByRef r_RegExOut = "" )
Sets a flag that determines whether a multiline edit control includes soft line-break characters.
Edit_FmtLines( hEdit, p_Flag )
Returns the zero-based index of the uppermost visible line.
Edit_GetFirstVisibleLine( hEdit )
Returns the zero-based line index of the last visible line on the edit control.
Edit_GetLastVisibleLine( hEdit )
Returns the current text limit for the edit control.
Edit_GetLimitText( hEdit )
Get the text of the desired line from the edit control.
Edit_GetLine( hEdit, p_LineIdx = -1, p_Length = -1 )
Returns an integer specifying the total number of text lines in a multiline edit control.
Edit_GetLineCount( hEdit )
Gets the widths of the left and right margins for the edit control.
Edit_GetMargins( hEdit, ByRef r_LeftMargin = "", ByRef r_RightMargin = "" )
Gets the state of the edit control’s modification flag.
Edit_GetModify( hEdit )
Gets the formatting rectangle of the edit control.
Edit_GetRect( hEdit, ByRef r_Left = "", ByRef r_Top = "", ByRef r_Right = "", ByRef r_Bottom = "" )
Gets the starting and ending character positions of the current selection in the edit control.
Edit_GetSel( hEdit, ByRef r_StartSelPos = "", ByRef r_EndSelPos = "" )
Returns the currently selected text (if any).
Edit_GetSelText( hEdit )
Returns all text from the control up to p_Length length.
Edit_GetText( hEdit, p_Length = -1 )
Returns the length, in characters, of the text in the edit control.
Edit_GetTextLength( hEdit )
Get a range of characters.
Edit_GetTextRange( hEdit, p_Min = 0, p_Max = -1 )
Returns TRUE if the edit control is multiline, otherwise FALSE.
Edit_IsMultiline( hEdit )
Returns TRUE if the ES_READONLY style has been set, otherwise FALSE.
Edit_IsReadOnly( hEdit )
Returns TRUE if the specified style has been set, otherwise FALSE.
Edit_IsStyle( hEdit, p_Style )
Adds, removes, or toggles a style for an edit control.
Edit_SetStyle( hEdit, p_Style, p_Option = "+" )
Gets the index of the line that contains the specified character index.
Edit_LineFromChar( hEdit, p_CharPos = -1 )
This function is the same as Edit_CharFromPos except the line index (r_LineIdx) is returned.
Edit_LineFromPos( hEdit, X, Y, ByRef r_CharPos = "", ByRef r_LineIdx = "" )
Gets the character index of the first character of a specified line.
Edit_LineIndex( hedit, p_LineIdx = -1 )
Gets the length of a line.
Edit_LineLength( hEdit, p_LineIdx = -1 )
Scrolls the text in the edit control for the current file.
Edit_LineScroll( hEdit, xScroll = 0, yScroll = 0 )
Load the contents of a file to the edit control.
Edit_LoadFile( hEdit, p_FileName, p_Convert2DOS = False, ByRef r_FileFormat = "" )
Copies the current content of the clipboard to the edit control at the current caret position.
Edit_Paste( hEdit )
Gets the client area coordinates of a specified character in the edit control.
Edit_PosFromChar( hEdit, p_CharPos, ByRef X, ByRef Y )
Replaces the selected text with the specified text.
Edit_ReplaceSel( hEdit, p_Text = "", p_CanUndo = True )
Save the contents of the edit control to a file.
Edit_SaveFile( hEdit, p_FileName, p_Convert = "" )
Scrolls the text vertically in the edit control.
Edit_Scroll( hEdit, p_Pages = 0, p_Lines = 0 )
Scrolls the edit control until caret is visible.
Edit_ScrollCaret( hEdit )
Sets the text limit of the edit control.
Edit_SetLimitText( hEdit, p_Limit )
Sets the width of the left and/or right margin (in pixels) for the edit control.
Edit_SetMargins( hEdit, p_LeftMargin = "", p_RightMargin = "" )
Sets or clears the modification flag for the edit control.
Edit_SetModify( hEdit, p_Flag )
Sets or removes the password character for a single-line edit control.
Edit_SetPasswordChar( hEdit, p_Char = "*" )
Sets or removes the read-only style (ES_READONLY) of the edit control.
Edit_SetReadOnly( hEdit, p_Flag )
Sets the formatting rectangle of a multiline edit control.
Edit_SetRect( hEdit, p_Left, p_Top, p_Right, p_Bottom )
Sets the tab stops in a multiline edit control.
Edit_SetTabStops( hEdit, p_NbrOfTabStops = 0, p_DTU = 32 )
Set the text of the edit control.
Edit_SetText( hEdit, p_Text )
Selects a range of characters.
Edit_SetSel( hEdit, p_StartSelPos = 0, p_EndSelPos = -1 )
Returns TRUE if text is selected, otherwise FALSE.
Edit_TextIsSelected( hEdit )
Undo the last operation.
Edit_Undo( hEdit )
Finds the handles for the active control and active window.
Edit_GetActiveHandles( ByRef hEdit = "", ByRef hWindow = "", p_MsgBox = False )