Inheritance diagram for RichEdit:


Public Member Functions | |
| FindText ([in] BSTR Text,[in, defaultvalue(FR_DOWN)] ULONG Flags,[in, defaultvalue(0)] LONG MinPos,[in, defaultvalue(-1)] LONG MaxPos,[out, retval] LONG *pResult) | |
| The method finds a text within a rich edit control. | |
| Load ([in] VARIANT Stream,[in, defaultvalue(SF_RTF)] ULONG Flags,[out, retval] VARIANT_BOOL *pResult) | |
| Loads a text from a stream. | |
| Save ([in] VARIANT Stream,[in, defaultvalue(SF_RTF)] ULONG Flags,[out, retval] VARIANT_BOOL *pResult) | |
| Saves a text to the stream. | |
| Redo (void) | |
| Redo the next action in the control's redo queue. | |
| Print ([in] BSTR Driver,[in] BSTR Device,[in] IDispatch *PrintInfo,[in, defaultvalue(FALSE)] VARIANT_BOOL Selection) | |
| Prints a text on a printer. | |
Properties | |
| IDispatch *RW | SelFont [] |
| Specifies the Font for a selection. | |
| IDispatch *R | Paragraph [] |
| Specifies the Paragraph object that can be used for changing a paragraph options. | |
| VARIANT_BOOL RW | AutoURLDetect [] |
| Specifies automatic URL detection. | |
| VARIANT_BOOL R | CanRedo [] |
| Determines whether there are any actions in the control redo queue. | |
| ULONG RW | UndoLimit [] |
| Specifies the undo limit for the control. | |
| VARIANT W | OnSelChange [] |
| Sets the event handler for the OnSelChange event. | |
| ULONG RW | PageRotate [] |
| Specifies text rotation. | |
| ULONG R | UndoName [] |
| Returns the type of the next undo action. | |
| BSTR R | UndoNameString [] |
| Returns the type of the next undo action as a string. | |
RichEdit control supports additional text and paragraph formatting options.
When the user changes a text, the OnChange event occur.
See also the CreateRichEdit method of the Frame.
Example (JScript):
o = new ActiveXObject("Scripting.WindowSystemObject") f = o.CreateForm(0,0,0,0) f.ClientWidth = 300 f.ClientHeight = 200 f.CenterControl() r = f.CreateRichEdit(10,10,400,100) r.Align = o.Translate("AL_CLIENT") r.Font.Size = 14 r.Add("Line 1") r.SelFont.Color = 0x00FF0000 r.Add("Line 3") r.SelFont.Bold = true r.SelFont.Color = 0x000000FF r.SelFont.Size = 16 r.Add("Line 2") f.Show() o.Run()
| FindText | ( | [in] BSTR | Text, | |
| [in, defaultvalue(FR_DOWN)] ULONG | Flags, | |||
| [in, defaultvalue(0)] LONG | MinPos, | |||
| [in, defaultvalue(-1)] LONG | MaxPos, | |||
| [out, retval] LONG * | pResult | |||
| ) |
The method finds a text within a rich edit control.
| Text | text. | |
| Flags | This parameter can be a combination of the following values:
| |
| MinPos | Specifies the starting point of the search. | |
| MaxPos | Specifies the ending point of the search (-1 - search to the end of the text). |
| pResult | Zero-based position of the first character of the match, -1 if the text not found. |
| Load | ( | [in] VARIANT | Stream, | |
| [in, defaultvalue(SF_RTF)] ULONG | Flags, | |||
| [out, retval] VARIANT_BOOL * | pResult | |||
| ) |
Loads a text from a stream.
| Stream | The Stream, may be a TextStream object, created by the OpenTextFile method of the FileSystemObject object (See Microsoft Platform SDK). | |
| Flags | This parameter can be one of the following values: |
Additional flags may be specified:
| pResult | TRUE undicates that the load operation successful. |
| ( | [in] BSTR | Driver, | ||
| [in] BSTR | Device, | |||
| [in] IDispatch * | PrintInfo, | |||
| [in, defaultvalue(FALSE)] VARIANT_BOOL | Selection | |||
| ) |
| Redo | ( | void | ) |
Redo the next action in the control's redo queue.
| Save | ( | [in] VARIANT | Stream, | |
| [in, defaultvalue(SF_RTF)] ULONG | Flags, | |||
| [out, retval] VARIANT_BOOL * | pResult | |||
| ) |
Saves a text to the stream.
| Stream | The Stream, may be a TextStream object, created by the OpenTextFile method of the FileSystemObject object (See Microsoft Platform SDK). | |
| Flags | This parameter can be one of the following values:
|
| pResult | TRUE undicates that the save operation successful. |
| VARIANT_BOOL RW AutoURLDetect |
Specifies automatic URL detection.
Default value: FALSE.
| VARIANT_BOOL R CanRedo |
Determines whether there are any actions in the control redo queue.
If the redo queue is not empty, you can use the Redo method.
| VARIANT W OnSelChange |
Sets the event handler for the OnSelChange event.
| ULONG RW PageRotate |
| IDispatch* R Paragraph |
Specifies the Paragraph object that can be used for changing a paragraph options.
| IDispatch* RW SelFont |
| ULONG RW UndoLimit |
Specifies the undo limit for the control.
Default value: 100.
| ULONG R UndoName |
Returns the type of the next undo action.
This parameter can be one of the following values:
| BSTR R UndoNameString |