TE Edit Control Win32 / Win64 Help
Product page

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 BasicYou 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 InterfacePlease refer to the Visual C++ Interface topic for the description of using the MFC wrapper classes.
Borland Delphi InterfacePlease refer to the Borland Delphi Interface topic for using the editor as an ActiveX control or a direct DLL control.
PowerBuilderPlease refer to the PowerBuilder Interface topic for help in creating a TE control instance in your PB application.
Visual FoxPro InterfacePlease 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_WRAPEnable word wrapping
TER_PRINT_VIEWWrap the lines on the screen as they would on the selected printer.
TER_PAGE_MODE
Edit one page at a time (useful for multicolumn documents)
TER_FITTED_VIEWSpecial case of page mode in which the text wraps to the window width and the soft page breaks are not displayed.
TER_HSCROLLEnable the horizontal scroll bar.
TER_VSCROLLEnable the vertical scroll bar.
TER_SHOW_STATUSShow the status ribbon
TER_SHOW_RULERShow horizontal ruler with tab stops
TER_SHOW_TOOLBARShow the tool bar
TER_BORDER_MARGINCreate a space margin around the text window
TER_OUTPUT_RTFStore the text in the RTF format
TER_READ_ONLYDo not allow edits.
TER_USE_EXT_STYLESIndicates 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_VRULERShow 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.