/*****************************************************************************
   Include this file in your program module which interfaces with HTS.DLL
   and TER.DLL.  This file automatically includes 'ter.h' file.
******************************************************************************/

#include "ter.h"

/******************************************************************************
               HTS Constants
*******************************************************************************/
#if defined (_WIN32)
   #if !defined(WIN32)
     #define WIN32
   #endif
#endif

/******************************************************************************
    WIN32 specific defines
*******************************************************************************/
#if defined (WIN32)
   #define HTS_HUGE
   #define _export
#else
   #define HTS_HUGE huge
#endif


/****************************************************************************
   Program constants
*****************************************************************************/
#define FONT_TEXT     0
#define FONT_H1       1
#define FONT_H2       2
#define FONT_H3       3
#define FONT_H4       4
#define FONT_H5       5
#define FONT_H6       6
#define FONT_H7       7
#define FONT_ADDRESS  8
#define FONT_QUOTE    9
#define FONT_MENU    10
#define FONT_DIR     11
#define FONT_PRE     12
#define FONT_EXAMPLE 13
#define FONT_VAR     14
#define FONT_KBD     15
#define FONT_SAMP    16
#define FONT_TR      17
#define FONT_HV      18
#define FONT_TT      19
#define FONT_TOTAL   20

#define HTML_FILE           0
#define HTML_BUF            1
#define HTML_FILE_DLG       2

#define STRONG              BOLD
#define EMPHASIZE           ITALIC
#define CITE                ITALIC

#define PICT_UNKNOWN        0
#define PICT_BMP            1
#define PICT_GIF            2
#define PICT_WMF            3
#define PICT_TIFF           4
#define PICT_JPG            5
#define PICT_PNG            6
#define PICT_NONE           7

#define METHOD_GET          0
#define METHOD_POST         1

#define FTYPE_TEXT            0
#define FTYPE_RADIO           1
#define FTYPE_SUBMIT          2
#define FTYPE_RESET           3
#define FTYPE_TEXTAREA        4
#define FTYPE_CHECKBOX        5
#define FTYPE_HIDDEN          6
#define FTYPE_PASSWORD        7
#define FTYPE_IMAGE           8
#define FTYPE_SELECT          9

#define PARA_LIST_NONE        0
#define PARA_LIST_OL          1
#define PARA_LIST_UL          2
#define PARA_LIST_MENU        3
#define PARA_LIST_DIR         4
#define PARA_LIST_DL          5

#define PARA_BLOCKQUOTE       1
#define PARA_ADDRESS          2
#define PARA_HR               3
#define PARA_PRE              4

#define PARA_FORM        0x1000       // in html form
#define PARA_BEGIN_LI    0x2000       // begins a new list item
#define PARA_DT          0x4000       // when PARA_LIST_DL set, this bit signifies the definition term

#define TERM_DT               1       // definition term
#define TERM_DD               2       // term definition

#define RFLAG_NO_HDR          0x1     // do not create header tags

#define HFLAG_OUTPUT_DEF_FONT 0x1     // output default font to the file
#define HFLAG_NO_TAG_FONT     0x2     // don't write the tag fonts to the output file
#define HFLAG_NO_PICT_PATH    0x4     // do not save the full path of a picture
#define HFLAG_NO_DIV          0x8     // produce <p> tag in place of <div> tag
#define HFLAG_SAVE_CELL_WIDTH 0x10    // save cell width even when cell width is not specified explicily
#define HFLAG_NO_FORM_SHADING 0x20    // do not shade the form in the edit mode
#define HFLAG_NO_TOGGLE_MSG   0x40    // do not display message message toggling from edit to the view mode
#define HFLAG_FIXED_VSCROLL   0x80    // do not allows auto displaying of vertical scroll bar
#define HFLAG_PRESERVE_SPACES 0x100   // preserve spaces in the line
#define HFLAG_SAVE_PICT_AS_WMF 0x200  // save the embedded pictures as metafiles
#define HFLAG_NO_SCRIPT       0x400   // don't process scripts
#define HFLAG_ROUND_BULLET    0x800   // import all bullets levels as round
#define HFLAG_NO_SPAN_TAG     0x1000  // do not write the span tags
#define HFLAG_WRITE_LINK_STYLE 0x2000  // output the link style to the file
#define HFLAG_NO_INTERNET     0x4000  // do not access internet
#define HFLAG_NO_HEAD         0x8000  // do not write the head tag
#define HFLAG_NO_BODY         0x10000 // do not write the body tag
#define HFLAG_NO_FONT         0x20000 // do not write the font tag
#define HFLAG_NO_STYLE        0x40000 // do not write the character style tags
#define HFLAG_NO_LIST_MARGIN  0x80000 // do not write margin information when writing the <li> tags
#define HFLAG_OUTPUT_DEF_FONTSIZE 0x100000     // output default font size to the file
#define HFLAG_OUTPUT_DEF_FONTCOLOR 0x200000     // output default font size to the file
#define HFLAG_NO_XLATE_LINK   0x400000  // do not translate %nn to character value
#define HFLAG_NO_HTML         0x800000  // no html tag
#define HFLAG_WELL_FORMED    0x1000000  // well-form doc
#define HFLAG_XML            0x2000000  // output xml doc
#define HFLAG_NO_CSS         0x4000000  // do not use cascading stylesheets
#define HFLAG_SAVE_CELL_WIDTH_PCT 0x8000000    // save cell width in percentage
#define HFLAG_SET_CELL_SPACE     0x10000000    // insert a space in an empty cell when writing out
#define HFLAG_COPY_CELL_PCT       0x20000000   // copy cell percentage width as they are read in
#define HFLAG_WRITE_NUM_CHAR_CODE 0x40000000   // always write numeric character codes

#define HFLAG2_DOCTYPE            0x1          // write the DOCTYPE tag
#define HFLAG2_IN_CONVERTER       0x2          // in html - rtf converter
#define HFLAG2_WRITE_OBJECT       0x4          // write object tag for the embedded ocx objects
#define HFLAG2_WRITE_OBJECT_PARAM 0x8          // write certain parameter value of ocx object
#define HFLAG2_SKIP_HREF          0x10         // ignore links in the html input
#define HFLAG2_OLD_HLINK          0x20         // support old type of hlink (hidden text/phrase pair)
#define HFLAG2_FLASH_SUPPORT      0x40         // generate html to support flash
#define HFLAG2_CATCH_ERRORS       0x80         // catch crash errors
#define HFLAG2_XLATE_SINGLE_QUOTE 0x100        // write single quote as &#39;
#define HFLAG2_KEEP_ROW_TOGETHER  0x200        // keep table row together
#define HFLAG2_XLATE_QUOTE        0x400        // translate to simple quote charcter while reading
#define HFLAG2_SAVE_PICT_AS_BMP   0x800        // save embedded pictures as bmp in when writing html
#define HFLAG2_WRITE_DIR          0x1000       // always write the dir= tag for the div tag
#define HFLAG2_DONT_POSITION_OBJECTS 0x2000    // don't position objects
#define HFLAG2_NO_CRLF            0x4000       // don't output cr/lr
#define HFLAG2_NO_NESTED_OBJECT   0x8000       // do not support the nested floating objects
#define HFLAG2_SKIP_DELETED_TEXT 0x10000       // do not write the text deleted using track-changes
#define HFLAG2_NO_COMBOBOX       0x20000       // true to include just the result text of the combo-box field
#define HFLAG2_NO_FIXED_TABLE_LAYOUT 0x40000   // do not write table-layout: fixed tag
#define HFLAG2_NO_FILE_PREFIX    0x80000       // Do not add file-prefix to the links
#define HFLAG2_SELECT_PRINT_MEDIA  0x200000    // select print-media insteado of screen when parsing css
#define HFLAG2_NO_FLOATING_OBJECTS 0x400000    // 20110717: don't allow floating objects
#define HFLAG2_DONT_WRITE_IMAGE_BORDER 0x800000 // don't write border attribute for the <img> tag since IE produces looses the picture when creating rtf copy clipboard copy from IE when using the generated html
#define HFLAG2_INPUT_FIELD_TO_TEXT_BOX 0x1000000 // convert the input fields to text-box when wrinting html
#define HFLAG2_NO_CRLF_IN_PARA         0x2000000 // suppress cr/lf within a paragraph
#define HFLAG2_WRITE_FIXED_TABLE_LAYOUT 0x4000000   // always write table-layout: fixed tag
#define HFLAG2_NO_LIST_INDENT_ADJ      0x8000000 // do not automatically indent the list for html output
#define HFLAG2_EMBED_PICTURE          0x10000000  // embed picture into html
#define HFLAG2_IGNORE_LINK_FILE 0x20000000 // 20150527: don't use the original link file as the picture source
#define HFLAG2_OMIT_TEXT_BOX    0x40000000 // 20150924: omit the text-box and frames during HTML output

#define HFLAG3_WORD_SUPPORT     0x2        // 20160704: tweak html output for Word
#define HFLAG3_OUTLOOK_SUPPORT  0x4      // 20170727: tweak html output for Outlook
#define HFLAG3_USE_FIRST_FONT   0x8      // 20171013: when more than one fonts are specified in font-family, pick up the first one
#define HFLAG3_NO_MIN_HEIGHT    0x10     // 20201027: don't write min-height attribute
#define HFLAG3_NO_COUNTERS      0x20     // 20220202: don't use counters to write lists
#define HFLAG3_UTF8_HTML_INPUT  0x40     // 20231207: default html input UTF-8


#define HMETA_HTTP_EQUIV      1       // http-equiv meta record
#define HMETA_NAME            2       // name meta record

#define TAG_EMPTY            0        // empty slot
#define TAG_CELL_QFN         1        // qfn stored for the td/th elements
#define TAG_PICT_SIZE        2        // original picture size
#define TAG_META             3        // meta records
#define TAG_PICT_USEMAP      4        // usemap record for the picture
#define TAG_USER             5        // user tags saved a meta records in the beginning of the file.

#define HALIGN_LEFT          3        // left align picture
#define HALIGN_RIGHT         4        // right align picture

#define USF_TABLE_LEVEL_2    0x1      // embedded tables
#define USF_TABLE_LEVEL_N    0x2      // multileve embedded tables
#define USF_MULTIPLE_FRAMESETS 0x4    // multiple framesets - invalid HTML construct
#define USF_FRAMESET_AND_TEXT  0x8    // a frameset document should not include regular text as well - invalid HTML construct
#define USF_SCRIPT             0x10   // embedded scripts

/****************************************************************************
   Menu command contants
*****************************************************************************/

#define HTM_FIRST_COMMAND  12097
#define HTM_PRINT_OPTIONS  12097
#define HTM_PRINT_PREVIEW  12098
#define HTM_COPY           12099
#define HTM_SAVE           12100
#define HTM_SAVE_AS        12101
#define HTM_NEW            12102
#define HTM_OPEN           12103
#define HTM_EDITOR         12104
#define HTM_VIEWER         12105
#define HTM_SHOW_HIDDEN    12106
#define HTM_SHOW_PARA_MARK 12107
#define HTM_FONTS       12108
#define HTM_LINK        12109
#define HTM_PRINT       12110
#define HTM_REFORMAT    12111

#define HTM_FIRST_EDIT_COMMAND 12112
#define HTM_HDR1        12112
#define HTM_HDR2        12113
#define HTM_HDR3        12114
#define HTM_HDR4        12115
#define HTM_HDR5        12116
#define HTM_HDR6        12117
#define HTM_HDR7        12118
#define HTM_BLOCKQUOTE  12119
#define HTM_PRE         12121
#define HTM_TT          12122
#define HTM_ADDRESS     12123
#define HTM_PARA_NORMAL 12124
#define HTM_LEFT        12125
#define HTM_RIGHT       12126
#define HTM_CENTER      12127
#define HTM_JUSTIFY     12128
#define HTM_BOLD        12129
#define HTM_ITALIC      12130
#define HTM_ULINE       12131
#define HTM_SUPSCR      12132
#define HTM_SUBSCR      12133
#define HTM_STRIKE      12134
#define HTM_CHAR_NORMAL 12135
#define HTM_LIST_OL     12136
#define HTM_LIST_UL     12137
#define HTM_LIST_LVL1   12138
#define HTM_LIST_LVL2   12139
#define HTM_LIST_LVL3   12140
#define HTM_LIST_LVL4   12141
#define HTM_LIST_LVL5   12142
#define HTM_LIST_LVL6   12143
#define HTM_LIST_LVL7   12144
#define HTM_NEW_LIST_ITEM 12145
#define HTM_LIST_DT     12146
#define HTM_LIST_DD     12147
#define HTM_EXAMPLE     12148
#define HTM_KBD         12149
#define HTM_SAMP        12150
#define HTM_VAR         12151
#define HTM_CHAR_TYPE_NORMAL 12152
#define HTM_INSERT_RULE 12153
#define HTM_EDIT_RULE   12154
#define HTM_INSERT_PICT 12155
#define HTM_INSERT_LINK 12156
#define HTM_EDIT_FORM_ID 12157
#define HTM_PARA_FORM   12158
#define HTM_SET_FORM_ID 12159
#define HTM_INSERT_TEXT_FIELD   12160
#define HTM_INSERT_BUTTON_FIELD 12161
#define HTM_INSERT_IMAGE_FIELD  12162
#define HTM_INSERT_SELECT_FIELD 12163
#define HTM_ADD_SELECT_ITEM     12164
#define HTM_DEL_SELECT_ITEM     12165
#define HTM_TBL_CREATE          12166
#define HTM_TBL_INSERT_ROW      12167
#define HTM_TBL_APPEND_ROW      12168
#define HTM_TBL_DELETE_ROW      12169
#define HTM_TBL_INSERT_COL      12170
#define HTM_TBL_APPEND_COL      12171
#define HTM_TBL_DELETE_COL      12172
#define HTM_CUT                 12173
#define HTM_FONT_COLOR          12174
#define HTM_FONT_SIZE           12175
#define HTM_EDIT_LINK           12176
#define HTM_TBL_CELL_WIDTH_FLAG 12177
#define HTM_PARA_SPACE          12178
#define HTM_TBL_CELL_COLOR      12179

#define HTM_LAST_COMMAND        12179


/****************************************************************************
   Error contants
*****************************************************************************/

#define HERR_MEM     1
#define HERR_INIT    2
#define HERR_EOF     3
#define HERR_SYNTAX  4
#define HERR_IO      5
#define HERR_OPEN    6
#define HERR_GIF     7
#define HERR_LZW     8
#define HERR_WMF     9
#define HERR_TIFF   10
#define HERR_VERSION 11
#define HERR_PICT   12
#define HERR_FORM   13
#define HERR_JPEG   14
#define HERR_SCRIPT 15
#define HERR_MISC   16
#define HERR_EXPIRED  17


/****************************************************************************
   Instructions for packing the following structure
*****************************************************************************/
#ifndef RC_INVOKED
   #pragma pack(1)
#endif


/****************************************************************************
   Instructions to resume the default structure packing.
*****************************************************************************/
#ifndef RC_INVOKED
   #pragma pack()
#endif

/****************************************************************************
   Message constants
*****************************************************************************/
#define HTS_TITLE   WM_USER+2250
#define HTS_LINK    WM_USER+2251
#define HTS_PICTURE WM_USER+2252
#define HTS_FORM    WM_USER+2253
#define HTS_PICT_ID WM_USER+2254
#define HTS_BASE    WM_USER+2255
#define HTS_LINK_URL  WM_USER+2256
#define HTS_LINK_INFO WM_USER+2257
#define HTS_BK_PICT   WM_USER+2258
#define HTS_INT_LINK  WM_USER+2259
#define HTS_FRAME_FILE WM_USER+2260
#define HTS_FRAME_NAME WM_USER+2261
#define HTS_SAVE_PICTURE WM_USER+2262


/******************************************************************************
                     Editor Function Prototype
   When calling HTS from a C program, leave the HTS_CPLUSPLUS symbol undefined.

   When calling HTS from a C++ program, define the HTS_CPLUSPLUS as following:

   #define HTS_CPLUSPLUS extern "C"
   #include "hts.h"
*******************************************************************************/
#ifndef HTS_CPLUSPLUS
   #if defined(__cplusplus)
      #define HTS_CPLUSPLUS extern "C"
   #else
      #define HTS_CPLUSPLUS
   #endif
#endif

HTS_CPLUSPLUS BOOL WINAPI _export HtsRead(HWND,int,LPBYTE,HGLOBAL,int,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsInitialize(HWND,HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsLoadControl(void);
HTS_CPLUSPLUS BOOL WINAPI _export HtsPositionName(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsClearWindow(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetFont(HWND,int,LPBYTE,float *,UINT far *,COLORREF far *,COLORREF far *);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetFont(HWND, int,LPBYTE,float,UINT,COLORREF,COLORREF,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetFontDlg(HWND,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetLinkInfo(HWND,UINT far *,COLORREF far *);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetLinkInfo(HWND,UINT,COLORREF);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetLinkInfoDlg(HWND);
HTS_CPLUSPLUS int  WINAPI _export HtsGetFormInfo(HWND,int,LPBYTE,LPBYTE);
HTS_CPLUSPLUS int  WINAPI _export HtsGetFieldData(HWND,int,int,LPBYTE,LPINT,LPBYTE,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsLparam2String(int,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsString2Lparam(LPBYTE,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPicture(HWND,int,int,LPSTR);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetBkColor(COLORREF);

HTS_CPLUSPLUS BOOL WINAPI _export HtsWrite(HWND,int,LPBYTE,HGLOBAL far *,LPINT,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsReformat(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsRtfToHtml(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetParaAttrib(HWND,LPINT,LPINT,LPINT,UINT far *,LPINT);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetHeader(HWND,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsParaNormal(HWND,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetList(HWND,int,int,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetMiscParaType(HWND,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetMiscCharType(HWND,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsMenuEnable(HWND,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsMenuSelect(HWND,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsCommand(HWND,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsInsertRule(HWND,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsEditRule(HWND,int,int,int,BOOL);
HTS_CPLUSPLUS int  WINAPI _export HtsInsertPicture(HWND,LPBYTE,int,BOOL,BOOL,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsInsertLink(HWND,LPBYTE,LPBYTE,LPBYTE,LPBYTE,BOOL,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsEditFormId(HWND,BOOL,int,int,LPBYTE,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetForm(HWND,BOOL,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetFormId(HWND,int);
HTS_CPLUSPLUS int  WINAPI _export HtsInsertTextField(HWND,LPBYTE,int,int,int,int,LPBYTE,BOOL);
HTS_CPLUSPLUS int  WINAPI _export HtsInsertButtonField(HWND,LPBYTE,int,BOOL,LPBYTE,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSave(HWND,int,LPBYTE,HGLOBAL far *,LPINT);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSaveU(HWND,int,LPWORD,HGLOBAL far *,LPINT);
HTS_CPLUSPLUS BOOL WINAPI _export HtsClose(HWND,int,LPBYTE,HGLOBAL far *,LPINT);
HTS_CPLUSPLUS int  WINAPI _export HtsInsertSelectField(HWND,LPBYTE,BOOL,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsAddSelectionItem(HWND,int,LPBYTE,LPBYTE,BOOL,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsDelSelectionItem(HWND,int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsNewFile(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsOpenFile(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetFontSize(HWND,int,BOOL,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetNewBkColor(HWND,COLORREF,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetBkPict(HWND,LPBYTE);
HTS_CPLUSPLUS int  WINAPI _export HtsRtfToHtmlEx(HWND,LPBYTE,UINT);
HTS_CPLUSPLUS DWORD WINAPI _export HtsSetFlags(HWND,BOOL,DWORD);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetLinkData(HWND,LPBYTE,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsUpdateLink(HWND,LPBYTE,LPBYTE,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetNewTextColor(HWND,COLORREF);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictUseMap(HWND,int,LPBYTE);
HTS_CPLUSPLUS int  WINAPI _export HtsGetTagData(HWND,int,int,int,LPINT,LPINT,LPBYTE,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetFontSizeTbl(int,int,int,int,int,int,int);
HTS_CPLUSPLUS HWND WINAPI _export HtsGetTopWin(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetTarget(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetTarget(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetFrameName(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetFrameName(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetActiveWnd(HWND);
HTS_CPLUSPLUS HWND WINAPI _export HtsGetActiveWnd(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsModified(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetReadOnly(HWND,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsInViewMode(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetLinkDataEx(HWND,LPBYTE,LPBYTE,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsUpdateLinkEx(HWND,LPBYTE,LPBYTE,LPBYTE,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetParaSpace(HWND,BOOL,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetTableWidth(HWND,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetListEx(HWND,int,int,int,int,BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetDefaultTarget(HWND,LPBYTE);
HTS_CPLUSPLUS int  WINAPI _export HtsGetCurForm(HWND,LPINT);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetUserTag(HWND,int,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetUserTag(HWND,int,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetDocTitle(HWND,LPBYTE);
HTS_CPLUSPLUS int  WINAPI _export HtsGetFontSize(HWND,LPINT);
HTS_CPLUSPLUS HWND WINAPI _export HtsGetActiveWnd2(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictFileBase(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictFileBaseU(LPWORD);
HTS_CPLUSPLUS BOOL WINAPI _export HtsIsHttpFile(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetDownloadDir(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsInternetGet(HWND, LPBYTE, LPBYTE, BOOL);
HTS_CPLUSPLUS BOOL WINAPI _export HtsIsLocalFile(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetCurPath(HWND,LPBYTE);
HTS_CPLUSPLUS DWORD WINAPI _export HtsSetFlags2(HWND,BOOL,DWORD);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictFileBase2(HWND,LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictFileBase2U(HWND,LPWORD);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetDownloadDir2(HWND, LPBYTE);
HTS_CPLUSPLUS int  WINAPI _export HtsGetLastMessage(HWND, LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictPrefix(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictFolder(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetImageSrcFolder(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetLicenseKey(LPBYTE);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetOverrideDPI(int);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetRelativeFolder(LPBYTE);
HTS_CPLUSPLUS DWORD WINAPI _export HtsSetFlags3(HWND,BOOL,DWORD);
HTS_CPLUSPLUS BOOL WINAPI _export HtsIsHttpFileU(LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsInternetGetU(HWND hWnd, LPWORD url, LPWORD OutFile, BOOL GetFromCache);
HTS_CPLUSPLUS BOOL WINAPI _export HtsIsLocalFileU(LPWORD);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictPrefixU(LPWORD prefix);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetPictFolderU(LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetRelativeFolderU(LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetImageSrcFolderU(LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetDownloadDirU(LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSetDownloadDir2U(HWND hWnd, LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsGetCurPathU(HWND hWnd,LPWORD path);
HTS_CPLUSPLUS BOOL WINAPI _export HtsIsLocalFileU(LPWORD path);


// Use by TER DLL
HTS_CPLUSPLUS BOOL WINAPI _export HtsSaveFromTer(HWND,BOOL,LPBYTE,HGLOBAL far *,LPINT);
HTS_CPLUSPLUS BOOL WINAPI _export HtsReadFromTer(HWND,BOOL,LPBYTE,HGLOBAL far *,int);


// functions not yet documented
HTS_CPLUSPLUS DWORD WINAPI _export HtsGetUsfList(HWND);
HTS_CPLUSPLUS BOOL  WINAPI _export HtsInitialize2(HWND,HWND,LPBYTE,LPBYTE,LPBYTE,DWORD);
HTS_CPLUSPLUS LRESULT WINAPI _export HtsCheckScriptResult(HWND);
HTS_CPLUSPLUS BOOL WINAPI _export HtsSaveFromTerU(HWND hWnd,BOOL ToFile,LPWORD OutFile, HGLOBAL far *hBuf, LPINT pBufLen);
HTS_CPLUSPLUS BOOL WINAPI _export HtsWriteU(HWND hWnd,int output,LPWORD OutFile, HGLOBAL far *hBuf, LPINT pBufLen, BOOL WriteSelection);
HTS_CPLUSPLUS BOOL WINAPI _export HtsReadFromTerU(HWND hWnd,BOOL FromFile,LPWORD InFile, HGLOBAL far *hBuf, int BufLen);
HTS_CPLUSPLUS BOOL WINAPI _export HtsReadU(HWND hWnd,int input, LPWORD pInFile,HGLOBAL hBuf,int BufLen,LPBYTE dest);


