Creating an Editor Window
TE Edit Control can be created in a number of different ways.
Please make sure that ter32.dll and txml2.dll files is installed in a directory available at run-time. When using this product as an ActiveX control, you would also need to copy the toc30.ocx file to the system directory and then register the toc30.ocx files using the regsvr32 Windows program (or using another option available in your programming environment).
When the control is used without using toc30.ocx, no MFC components are needed to run the ter32.dll file.
The product Licenes Key must be provided before or after creating a TE control for unrestricted used.
Once a TE control instance is created, you can use any of the functions or methods listed in the Application Interface Functions topic.
Here are various methods of creating a TE Edit Control window in different programming environments:
Visual Basic | You would register the toc30.ocx control file and drop the control into your application form. Please refer to the Visual Basic Interface and ActiveX Control topics for detail information on this subject. |
Visual C++ and C | You can use the ActiveX interface to drop the control into your application window. You can also create a TE window using the CreateTerWindow or TerCreateWindowAlt functions. The package contains the ter32.LIB (ter30BC.LIB for Borland C/C++ Builder) file which must be linked to your application. Modify the link statement of your application to include the ter32.LIB file into the list of libraries. Your application modules which use TER API functions, should also include the TER.H and TER_CMD.H files. |
MFC Interface | Please refer to the Visual C++ Interface topic for the description of using the MFC wrapper classes. |
Borland Delphi Interface | Please refer to the Borland Delphi Interface topic for using the editor as an ActiveX control or a direct DLL control. |
PowerBuilder | Please refer to the PowerBuilder Interface topic for help in creating a TE control instance in your PB application. |
Visual FoxPro Interface | Please refer to the Visual FoxPro Interface topic for help in creating a TE control instance in your VFP application. |
Using CreateWindow SDK function. | The window class should be specified as "Ter32Class". The style parameter to the CreateWindow API should be OR'd with one or many of the following TE style constants as needed by your application. |
TER_WORD_WRAP | Enable word wrapping |
TER_PRINT_VIEW | Wrap the lines on the screen as they would on the selected printer. |
TER_PAGE_MODE | |
TER_FITTED_VIEW | Special case of page mode in which the text wraps to the window width and the soft page breaks are not displayed. |
TER_HSCROLL | Enable the horizontal scroll bar. |
TER_VSCROLL | Enable the vertical scroll bar. |
TER_SHOW_STATUS | Show the status ribbon |
TER_SHOW_RULER | Show horizontal ruler with tab stops |
TER_SHOW_TOOLBAR | Show the tool bar |
TER_BORDER_MARGIN | Create a space margin around the text window |
TER_OUTPUT_RTF | Store the text in the RTF format |
TER_READ_ONLY | Do not allow edits. |
TER_USE_EXT_STYLES | Indicates that additional style constants are passed using the lpParam parameter of the CreateWindow SDK fucntions. |
Here is the list of additional constants passed using lpParam parameter:
TEREX_SHOW_VRULER | Show vertical ruler. |
Include the TER.H file to define these constants.
Once the editor window is created, you can insert and retrieve the editor data using the 'SetTerBuffer' and 'GetTerBuffer' functions. You can also use other API functions (see Application Interface Functions) to manipulate the text data in the TER control.