Attribute VB_Name = "TER"
Option Explicit

Rem ******************************************************************************
Rem TER.BAS Declaration statements for Visual Basic programs
Rem         This is the translation of TER.H (include file for 'C' environment)
Rem         for Visual Basic environment.  This module must be included
Rem         into your Visual Basic project
Rem *****************************************************************************

Rem Public Constants

Public Const TER_DATA_VER = 101

Public Const CLRADJ_TEXT = 1
Public Const CLRADJ_HLINK = 2
Public Const CLRADJ_FIELD = 3
Public Const CLRADJ_LIST = 4
Public Const CLRADJ_BORDER = 5
Public Const CLRADJ_BULLET = 6
Public Const CLRADJ_BKND = 7
Public Const CLRADJ_RECT_FILL = 8
Public Const CLRADJ_OBJECT_LINE = 9

Public Const CROP_LEFT = 1
Public Const CROP_RIGHT = 2
Public Const CROP_TOP = 3
Public Const CROP_BOT = 4

Public Const MAX_WIDTH = 1000
Public Const MAX_TAB_STOPS = 20
Public Const HILIGHT_OFF = 0
Public Const HILIGHT_LINE = 1
Public Const HILIGHT_CHAR = 2

Public Const PERM_PRINT = &H4
Public Const PERM_MOD = &H28
Public Const PERM_COPY = &H10

Public Const PDFFLAG_COMPRESS_TEXT = &H1
Public Const PDFFLAG_NO_BOOKMARK = &H2
Public Const PDFFLAG_EMBED_FONTS = &H4
Public Const PDFFLAG_NO_HLINK = &H8
Public Const PDFFLAG_BINARY_HINT = &H10
Public Const PDFFLAG_EXACT_TEXT_PLACEMENT = &H20
Public Const PDFFLAG_NO_CACHING = &H40
Public Const PDFFLAG_DO_XPARENT = &H80
Public Const PDFFLAG_MULTI_DOC = &H100
Public Const PDFFLAG_NO_PAGE_BM = &H200       ' do not create page bitmap, page bitmap is needed to support transparency
Public Const PDFFLAG_NO_BOOKMARK_PANE = &H400  ' do not open the bookmark pane - only applicable when bookmarks are enabled
Public Const PDFFLAG_RC4_128 = &H800           ' use RC4-128 bit encryption when password is used
Public Const PDFFLAG_AES_128 = &H1000          ' use AES-128 bit encryption when password is used
Public Const PDFFLAG_RETURN_MSG_ID =&H2000     ' sets the RFLAG_RETURN_MSG_ID flag
Public Const PDFFLAG_PDFA_1B       =&H10000    ' minimum compliance pdf/a-1b
Public Const PDFFLAG_PDFA          =&H20000    ' minimum compliance pdf/a
Public Const PDFFLAG_SHOW_MISSING_SSZLIB_MSG = &H40000 ' show a message if sszlib not found
Public Const PDFFLAG_CLEAR_BKND    =&H100000   ' clear page background 
Public Const PDFFLAG_TAGGED        =&H200000   ' true to generated tagged pdf

Public Const CLR_AUTO = &H10101            ' auto text color
Public Const CLR_INVALID = &HFFFFFFFF        ' this value indicates an invalid color (windows SDK constant)

Public Const FLOW_DEF = 0
Public Const FLOW_LTR = 1
Public Const FLOW_RTL = 2

Public Const SWRAP_NO_WRAP = 1
Public Const SWRAP_AROUND = 2
Public Const SWRAP_IGNORE = 3
Public Const SWRAP_TIGHT = 4
Public Const SWRAP_THRU = 5



Public Const OLEPTR_OBJECT = 0
Public Const OLEPTR_STORAGE = 1

Public Const TP_TOTAL_LINES = 1
Public Const TP_TOTAL_PFMTS = 2
Public Const TP_TOTAL_FONTS = 3
Public Const TP_TOTAL_STYLES = 4
Public Const TP_TOTAL_PAGES = 5
Public Const TP_TOTAL_PARA_FRAMES = 6
Public Const TP_TOTAL_CHAR_TAGS = 7
Public Const TP_TOTAL_IMAGE_MAPS = 8
Public Const TP_TOTAL_BLTS = 9
Public Const TP_TOTAL_LISTS = 10
Public Const TP_TOTAL_LIST_OR = 11
Public Const TP_TOTAL_TABS = 12
Public Const TP_TOTAL_TABLE_ROWS = 13
Public Const TP_TOTAL_CELLS = 14
Public Const TP_TOTAL_SECTS = 15
Public Const TP_CUR_LINE = 16
Public Const TP_CUR_COL = 17
Public Const TP_CUR_SECT = 18
Public Const TP_SELECTION_TYPE = 19
Public Const TP_SELECTION_START_LINE = 20
Public Const TP_SELECTION_START_COL = 21
Public Const TP_SELECTION_END_LINE = 22
Public Const TP_SELECTION_END_COL = 23
Public Const TP_WATERMARK_WASH = 24
Public Const TP_WATERMARK_PICT = 25
Public Const TP_PAGE_BK_COLOR = 26
Public Const TP_TOTAL_REVIEWERS = 27
Public Const TP_MOUSE_ON_TEXT_LINE = 28
Public Const TP_WIN_ORG_Y = 30

Public Const TP_MOUSE_FIRST = 31
Public Const TP_MOUSE_X = 31
Public Const TP_MOUSE_Y = 32
Public Const TP_MOUSE_LINE = 33
Public Const TP_MOUSE_COL = 34
Public Const TP_MOUSE_FONT_ID = 35
Public Const TP_MOUSE_PICT_ID = 36
Public Const TP_MOUSE_FIELD_ID = 37
Public Const TP_MOUSE_LAST = 37

Public Const TP_DEF_CHARSET = 60
Public Const TP_TOTAL_CHARS = 61
Public Const TP_PREVIEW_ZOOM_PCT = 62
Public Const TP_TABLE_COLS_SELECTED = 63
Public Const TP_TABLE_ROWS_SELECTED = 64
Public Const TP_HAS_TRACK_CHANGES = 65       ' return true if the document contains unaccepted track-chnages
Public Const TP_CUR_REV_ID = 66              ' current reviever id if track-change is enabled
Public Const TP_INIT_LIST_INDENT = 67         ' initial list indent
Public Const TP_FIXED_BULLET_SIZE = 68        ' fixed bullet size in twips
Public Const TP_DRAGGING_TEXT = 69            ' true when the text is being dragged
Public Const TP_SHOW_HIDDEN_TEXT      =70     ' true when showing hidden text
Public Const TP_TEXT_DEF_BK_COLOR     =71
Public Const TP_JUST_LINE_BREAK_LINE  =72

Public Const TPS_INIT_LIST_INDENT = 1
Public Const TPS_FIXED_BULLET_SIZE    =2     ' fixed bullet size in twips
Public Const TPS_JUST_LINE_BREAK_LINE =3
Public Const TPS_PAGE_NUM_FORMAT      =4     ' page number format string, example:  '\* GB4' for the chinese page numbers

Public Const CP_FIX_WIDTH = 0
Public Const CP_PARENT_CELL = 1
Public Const CP_LEVEL = 2
Public Const CP_TEXT_ROTATION = 3
Public Const CP_WIDTH = 4                 ' cell width
Public Const CP_ROW = 5                   ' id of the row which includes the cell
Public Const CP_ID = 6                    ' curent cell id
Public Const CP_NEXT = 7                  ' next cell id
Public Const CP_PREV = 8                  ' previous cell id
Public Const CP_ROW_WIDTH = 9             ' width of the row containing the cell
Public Const CP_PAD_LEFT = 10             ' left padding in twips
Public Const CP_PAD_RIGHT = 11            ' right padding in twips
Public Const CP_PAD_TOP = 12              ' top padding in twips
Public Const CP_PAD_BOT = 13              ' bottom padding in twips
Public Const CP_TABLE_PICT = 14           ' table picture id
Public Const CP_CELL_PICT = 15            ' cell picture id
Public Const CP_TEXT_ANGLE = 16           ' text angle
Public Const CP_FLAGS = 17                ' flags

Public Const RP_FIRST_CELL = 0            ' first cell id for the row
Public Const RP_LAST_CELL = 1             ' last cell id for the row
Public Const RP_TOP_ROW_HT = 2            ' height of the top part of a split row
Public Const RP_BOT_ROW_HT = 3            ' height of the top part of a split row
Public Const RP_FLAGS = 4                 ' row flags

Public Const FP_TEXT_ROTATION = 1
Public Const FP_WRAP_STYLE = 2
Public Const FP_YBASE = 3
Public Const FP_FILL_PATTERN = 4
Public Const FP_TEXT_DIST = 5
Public Const FP_ARROW_TYPE = 6            ' PF2_START_ARROW, PF2_END_ARROW, or 0
Public Const FP_X = 7                     ' x position in current base positioning - same as ParaFrame[].x
Public Const FP_Y = 8                     ' y position in current base positioning - same as ParaFrame[].y
Public Const FP_ZORDER = 9                ' Z Order
Public Const FP_PICT = 10                 ' picture id for the frame
Public Const FP_SHAPE_TYPE = 11           ' shape type
Public Const FP_FLAGS = 12                ' frame flags PARA_FRAME_ constants
Public Const FP_FLAGS2 = 13               ' frame flags PF2_ constants
Public Const FP_PAGE_NO = 14              ' page number
Public Const FP_LINE_THICKNESS = 15       ' line thickness twips
Public Const FP_LINE_COLOR = 16           ' line color
Public Const FP_FILL_COLOR = 17           ' fill color
Public Const FP_WIDTH = 18                ' width of the object in twips
Public Const FP_HEIGHT = 19               ' height in twips
Public Const FP_LINE_TYPE = 20            ' height in twips
Public Const FP_CANVAS = 21               ' canvas para-frame id
Public Const FP_SIDE_MARGIN = 22          ' side margin value
Public Const FP_TOP_MARGIN = 23           ' top margin value
Public Const FP_BOT_MARGIN = 24           ' bottom margin value

Public Const FP_ERROR = 9999

Public Const SP_FLAGS = 1
Public Const SP_LINE_STEP = 2
Public Const SP_BORDER_TYPE = 3
Public Const SP_BORDER_WIDTH = 4
Public Const SP_BORDER_SPACE = 5
Public Const SP_BORDER_COLOR = 6
Public Const SP_FIRST_PAGE_HDR_HT = 7
Public Const SP_FIRST_PAGE_BODY_HT = 8
Public Const SP_IN_USE = 10
Public Const SP_PREV_SECT = 11
Public Const SP_NEXT_SECT = 12
Public Const SP_AUX_ID = 13
Public Const SP_LINE_BET_COL = 14
Public Const SP_LEFT_MARG = 15             ' left margin
Public Const SP_RIGHT_MARG = 16            ' right margin
Public Const SP_TOP_MARG = 17              ' top margin
Public Const SP_BOT_MARG = 18              ' bottom margin
Public Const SP_HDR_MARG = 19              ' distance from the top of the page where the page header begins
Public Const SP_FTR_MARG = 20              ' distance from the bottom of the page where the page footer begins
Public Const SP_GUTTER_MARG =21            ' gutter margin
Public Const SP_NUM_COLS  =22              ' space number of columns, 20141125
Public Const SP_COL_SPACE =23              ' space between the columns in twips, 20141125

Public Const PP_PAGE_HDR_HT = 1           ' page header height
Public Const PP_PAGE_BODY_HT = 2          ' page body height
Public Const PP_PAGE_FTR_HT = 3           ' page header height
Public Const PP_DISP_NO = 4               ' page number for display
Public Const PP_NO = 5                    ' current page number
Public Const PP_TOP_SECT = 6              ' section for the top of the page
Public Const PP_FIRST_LINE = 7            ' first line of the page
Public Const PP_LAST_LINE = 8             ' last line of the page
Public Const PP_FLAGS = 9                 ' page flags
Public Const PP_PAGE_BODY_AVAIL_HT = 10   ' available height (in twips) in the body of the page

Public Const LP_LINE_FLAGS = 1
Public Const LP_LINE_FLAGS2 = 2
Public Const LP_LINE_LEN = 3
Public Const LP_LIST_NBR = 4              ' list number associate with the line
Public Const LP_LIST_FONT = 5             ' font id to print the list
Public Const LP_CELL_ID = 6               ' cell id for the line
Public Const LP_PARA_FRAME_ID = 7         ' para frame id
Public Const LP_LIST_ID = 8               ' list id
Public Const LP_LIST_OR_ID = 9            ' list or id
Public Const LP_LIST_LEVEL = 10           ' list level
Public Const LP_LINE_NUM = 11             ' current line number
Public Const LP_PARA_MARK = 12            ' para-mark found at the end of this line
Public Const LP_LIST_TEXT_WIDTH = 13      ' width of list text in twips
Public Const LP_HEIGHT = 14               ' Line height in twips
Public Const LP_LIST_BULLET_SYM = 15      ' list bullet symbol
Public Const LP_LIST_TEXT = 16            ' list text (TerGetListParamStr method)
Public Const LP_PARA_FIRST_LINE = 17      ' first line for the paragraph which contains the given line
Public Const LP_PARA_LAST_LINE = 18       ' last line for the paragraph which contains the given line
Public Const LP_SECT_ID = 19              ' section id for the line

Public Const LP_ERROR = 9999

Public Const PFRAME_NONE = 0
Public Const PFRAME_LEFT = 1
Public Const PFRAME_RIGHT = 2
Public Const PFRAME_FLOAT = 3

Public Const FONTINFO_UCBASE = 1
Public Const FONTINFO_CHARSET = 2
Public Const FONTINFO_PICT_WIDTH = 3
Public Const FONTINFO_PICT_HEIGHT = 4
Public Const FONTINFO_ULINE_COLOR = 5
Public Const FONTINFO_AUX_ID = 6
Public Const FONTINFO_FLAGS = 7
Public Const FONTINFO_FRAME_TYPE = 8
Public Const FONTINFO_FRAME_ID = 9
Public Const FONTINFO_IS_PICT = 11
Public Const FONTINFO_IS_OLE = 12
Public Const FONTINFO_IS_OCX = 13
Public Const FONTINFO_FIELD_ID = 14
Public Const FONTINFO_INS_REV_ID = 15
Public Const FONTINFO_DEL_REV_ID = 16
Public Const FONTINFO_CHAR_SCALEX = 17
Public Const FONTINFO_CHAR_SPACE = 18
Public Const FONTINFO_IS_RTL = 19
Public Const FONTINFO_SIZE = 20
Public Const FONTINFO_STYLE = 21
Public Const FONTINFO_COLOR = 22
Public Const FONTINFO_BK_COLOR = 23
Public Const FONTINFO_WLINE_COLOR = 24
Public Const FONTINFO_FLOW = 25
Public Const FONTINFO_HAS_COMMENTS = 26

Public Const PARAINFO_TEXT_FLOW = 1
Public Const PARAINFO_BORDER_COLOR = 2
Public Const PARAINFO_BK_COLOR = 3
Public Const PARAINFO_SPC_BEF = 4
Public Const PARAINFO_SPC_AFT = 5
Public Const PARAINFO_SPC_BET = 6

Public Const SSINFO_NAME = 1
Public Const SSINFO_CHAR_SPACE = 2
Public Const SSINFO_CHAR_OFFSET = 3
Public Const SSINFO_NEXT = 4
Public Const SSINFO_OUTLINE_LEVEL = 5

Public Const TEXT_HORZ = 0
Public Const TEXT_TOP_TO_BOT = 1
Public Const TEXT_BOT_TO_TOP = 2

Public Const INFO_TITLE = 0
Public Const INFO_SUBJECT = 1
Public Const INFO_AUTHOR = 2
Public Const INFO_MANAGER = 3
Public Const INFO_COMPANY = 4
Public Const INFO_OPERATOR = 5
Public Const INFO_CATEGORY = 6
Public Const INFO_KEYWORDS = 7
Public Const INFO_COMMENT = 8
Public Const INFO_PWHASH = 9
Public Const INFO_HLINKBASE = 10

Public Const FFLAG_AUTO_SPELL = &H400
Public Const FFLAG_EQ_OBJECT = &H800

Public Const TER_WORD_WRAP = &H1
Public Const TER_PRINT_VIEW = &H2
Public Const TER_HSCROLL = &H4
Public Const TER_VSCROLL = &H8
Public Const TER_SHOW_STATUS = &H10
Public Const TER_SHOW_RULER = &H20
Public Const TER_BORDER_MARGIN = &H40
Public Const TER_OUTPUT_RTF = &H80
Public Const TER_USE_PARAMS = &H100
Public Const TER_READ_ONLY = &H200
Public Const TER_PAGE_MODE = &H400
Public Const TER_SHOW_TOOLBAR = &H800
Public Const TER_INVISIBLE = &H1000
Public Const TER_FITTED_VIEW = &H2000

Public Const WRAP_OFF = 0                 ' suspend wrapping temporarily
Public Const WRAP_MIN = 1                 ' re-wrap minimum number of lines
Public Const WRAP_PARA = 2                ' re-wrap all lines in the current paragraph
Public Const WRAP_WIN = 3                 ' re-wrap all lines visible in the current window

Public Const APPLY_IGNORE = 0             ' ignore text data
Public Const APPLY_MOD_CUR_LINE = 1       ' apply the text data to the current line
Public Const APPLY_BEF_CUR_LINE = 2       ' insert after the current line
Public Const APPLY_AFT_CUR_LINE = 3       ' insert after the current line

Public Const WS_OVERLAPPEDWINDOW = &HCF0000
Public Const WS_CHILD = &H40000000
Public Const MF_ENABLED = 0
Public Const MF_GRAYED = 1
Public Const MF_CHECKED = 8
Public Const MF_UNCHECKED = 0

Public Const SID_NORMAL = -9999
Public Const SID_CUR = -9998


Public Const SAVE_TER = 0                 ' save in TER format
Public Const SAVE_TEXT = 1                ' save in TEXT format
Public Const SAVE_TEXT_LINES = 2          ' save in TEXT with line breaks
Public Const SAVE_RTF = 3                 ' save in RTF (rich text format) format
Public Const SAVE_DEFAULT = 4             ' save in the input file format (no format change)
Public Const SAVE_HTML = 5                ' save in the html format, requires HTML add-on
Public Const SAVE_UTEXT = 6               ' save in the unicode foramt
Public Const SAVE_DOCX = 7                ' word docx format
Public Const SAVE_DOC = 8                 ' word doc format

Public Const ULINE = &H1
Public Const BOLD = &H2
Public Const ITALIC = &H4
Public Const STRIKE = &H8
Public Const SUPSCR = &H10
Public Const SUBSCR = &H20
Public Const HIDDEN = &H40
Public Const pict = &H80
Public Const ULINED = &H100
Public Const PROTECT = &H200
Public Const FNOTE = &H400
Public Const FNOTETEXT = &H800
Public Const FNOTEREST = &H1000
Public Const HLINK = &H4000
Public Const ENOTETEXT = &H8000&
Public Const CAPS = &H10000
Public Const SCAPS = &H20000
Public Const DOUBLE_STRIKE = &H80000

Public Const CENTER = &H1
Public Const RIGHT_JUSTIFY = &H2
Public Const PARA_BOX_TOP = &H10
Public Const PARA_BOX_BOT = &H20
Public Const PARA_BOX_LEFT = &H40
Public Const PARA_BOX_RIGHT = &H80
Public Const PARA_BOX_DOUBLE = &H100
Public Const PARA_BOX_THICK = &H200
Public Const LEFT_JUSTIFY = &H400
Public Const PAGE_HDR = &H1000
Public Const PAGE_FTR = &H2000
Public Const PAGE_HDR_FTR = &H3000
Public Const JUSTIFY = &H800
Public Const DOUBLE_SPACE = &H4
Public Const PARA_KEEP = &H4000
Public Const PARA_KEEP_NEXT = &H8000&
Public Const AUTO_SPACE_BEFORE = &H20000
Public Const AUTO_SPACE_AFTER = &H40000

Public Const PFLAG_NO_WRAP = &H10
Public Const PFLAG_WIDOW = &H20

Public Const ROWFLAG_HDR = &H4
Public Const ROWFLAG_HAS_SUBTABLE = &H8
Public Const ROWFLAG_SPLIT = &H10
Public Const ROWFLAG_KEEP = &H2000
Public Const ROWFLAG_PREEXIST = &H4000
Public Const ROWFLAG_NEW_TABLE = &H8000&
Public Const ROWFLAG_RTL = &H10000
Public Const ROWFLAG_BREAK = &H20000

Public Const TAB_LEFT = 0
Public Const TAB_RIGHT = 1
Public Const TAB_CENTER = 2
Public Const TAB_DECIMAL = 3

Public Const TAB_NONE = 0
Public Const TAB_DOT = 1
Public Const TAB_HYPH = 2
Public Const TAB_ULINE = 4

Public Const SRCH_SCROLL = &H1
Public Const SRCH_SEARCH = &H2
Public Const SRCH_REPLACE = &H4
Public Const SRCH_RETRIEVE = &H8
Public Const SRCH_CASE = &H10
Public Const SRCH_WORD = &H20
Public Const SRCH_SKIP_HIDDEN_TEXT = &H40
Public Const SRCH_BACK = &H80
Public Const SRCH_NO_REPLACE_PROT_TEXT = &H100

Public Const CF_DIB = 8
Public Const CF_BITMAP = 2
Public Const CF_METAFILEPICT = 3
Public Const CF_ENHMETAFILE = 14

Public Const POS_BEG = 0
Public Const POS_END = 1

Public Const DOB_TEXT_BOX = 1
Public Const DOB_RECT = 2
Public Const DOB_LINE = 3

Public Const DOB_LINE_NONE = 0
Public Const DOB_LINE_SOLID = 1
Public Const DOB_LINE_DOTTED = 2

Public Const SSTYPE_CHAR = 1
Public Const SSTYPE_PARA = 2

Public Const DMORIENT_PORTRAIT = 1
Public Const DMORIENT_LANDSCAPE = 2

Public Const BASE_PAGE = 0
Public Const BASE_MARG = 1
Public Const BASE_PARA = 2

Public Const SEL_CELLS = 1
Public Const SEL_COLS = 2
Public Const SEL_ROWS = 3
Public Const SEL_ALL = 4

Public Const ALIGN_BOT = 0
Public Const ALIGN_MIDDLE = 1
Public Const ALIGN_TOP = 2

Public Const BKPICT_STRETCH = 1
Public Const BKPICT_TILE = 2

Public Const RHDR_CHAR = 2
Public Const RFTR_CHAR = 3
Public Const ZWNJ_CHAR = 4
Public Const HPARA_CHAR = 5
Public Const HYPH_CHAR = 6
Public Const LHDR_CHAR = 7
Public Const LFTR_CHAR = 8
Public Const PAGE_CHAR = 12
Public Const NBSPACE_CHAR = 14
Public Const LINE_CHAR = 15
Public Const SECT_CHAR = 20
Public Const COL_CHAR = 22
Public Const PARA_CHAR = 21
Public Const CELL_CHAR = 19
Public Const ROW_CHAR = 18
Public Const HDR_CHAR = 17
Public Const FTR_CHAR = 16
Public Const NBDASH_CHAR = 23
Public Const PICT_CHAR = 24
Public Const FHDR_CHAR = 25
Public Const FFTR_CHAR = 26

Public Const BRDRTYPE_SINGLE = 0
Public Const BRDRTYPE_DBL = 1
Public Const BRDRTYPE_TRIPLE = 2
Public Const BRDRTYPE_SHADOW = 3
Public Const BRDRTYPE_THICK_THIN = 4
Public Const BRDRTYPE_THICK_THIN_THICK = 5
Public Const BRDRTYPE_THIN_THICK = 6
Public Const BRDRTYPE_THIN_THICK_THIN = 7
Public Const BRDRTYPE_NONE = 8
Public Const BRDRTYPE_LAST = 9


Public Const UNDO_INSERT = "I"
Public Const UNDO_OBJECT_INSERT = "O"
Public Const UNDO_DELETE = "D"
Public Const UNDO_FONT = "F"
Public Const UNDO_PARA = "P"
Public Const UNDO_REPLACE = "R"
Public Const UNDO_ROW_DEL = "T"
Public Const UNDO_ROW_INS = "S"
Public Const UNDO_CELL_DEL = "U"
Public Const UNDO_CELL_INS = "V"
Public Const UNDO_FRAME = "1"
Public Const UNDO_FRAME_LIMITED = "2"
Public Const UNDO_PICT_SIZE = "3"
Public Const UNDO_TABLE_ATTRIB = "4"


Public Const TFLAG_RESIZE_BITMAP = &H1
Public Const TFLAG_METRIC = &H2
Public Const TFLAG_RETURN_MSG_ID = &H4
Public Const TFLAG_APPLY_PRT_ORIENT = &H8
Public Const TFLAG_APPLY_PRT_PROPS = &H8
Public Const TFLAG_IGNORE_PICT_LINK = &H10
Public Const TFLAG_DISABLE_ACCEL = &H20
Public Const TFLAG_USE_NEXT_ID = &H40
Public Const TFLAG_SHOW_CARET = &H80
Public Const TFLAG_UNPROTECTED_DEL = &H100
Public Const TFLAG_NO_HOUR_GLASS = &H200
Public Const TFLAG_NO_CHILD_TOP = &H400
Public Const TFLAG_NO_WRAP = &H800
Public Const TFLAG_ACTIVATE_MDI_CHILD = &H1000
Public Const TFLAG_COMP_WORD97 = &H2000
Public Const TFLAG_EXCLUDE_HIDDEN_SEL = &H4000
Public Const TFLAG_AUTO_VSCROLL_BAR = &H8000&
Public Const TFLAG_NO_PALETTE = &H10000
Public Const TFLAG_KEEP_PICT_ASPECT = &H20000
Public Const TFLAG_KEEP_FRAME_ASPECT = &H40000
Public Const TFLAG_PICT_IN_FRAME = &H80000
Public Const TFLAG_NO_PRINTER = &H100000
Public Const TFLAG_NO_DRAG_TEXT = &H200000
Public Const TFLAG_NO_EDIT_OLE = &H400000
Public Const TFLAG_BETTER_256 = &H800000
Public Const TFLAG_NO_EDIT_PICT = &H1000000
Public Const TFLAG_SHOW_BREAKS = &H2000000
Public Const TFLAG_SELECT_FULL_HLINK = &H4000000
Public Const TFLAG_NO_OLE = &H10000000
Public Const TFLAG_ROW_PASTE = &H20000000
Public Const TFLAG_NO_AUTO_FULL_CELL_SEL = &H40000000
Public Const TFLAG_SWAP_DECIMAL = &H80000000

Public Const TFLAG2_COMP_WPF = &H1
Public Const TFLAG2_RETAIN_BKND = &H2
Public Const TFLAG2_USE_PAL_FOR_TEXT = &H4
Public Const TFLAG2_CAN_MERGE_PROT_TEXT = &H8
Public Const TFLAG2_BKPICT_OVER_PAGE_BORDER = &H10
Public Const TFLAG2_NO_CARET = &H40
Public Const TFLAG2_SHOW_SECT_PAGE_NO = &H80
Public Const TFLAG2_NO_CURSOR_CHANGE = &H100
Public Const TFLAG2_VERT_THUMB_TRACK = &H200
Public Const TFLAG2_NO_AUTO_REPAGE = &H400
Public Const TFLAG2_NO_BKP_FILE = &H800
Public Const TFLAG2_SELECT_FRAME_PICT = &H1000
Public Const TFLAG2_HIDE_PAGE_BREAK = &H2000
Public Const TFLAG2_PROTECT_FORMAT = &H4000
Public Const TFLAG2_NO_HIDDEN_RTF_TEXT = &H8000&
Public Const TFLAG2_NO_SHADE_FIELD_TEXT = &H10000
Public Const TFLAG2_IGNORE_TIMER = &H20000
Public Const TFLAG2_NO_AUTO_HDR_FTR = &H40000
Public Const TFLAG2_WRITE_FIRST_RTF_COLOR = &H80000
Public Const TFLAG2_FULL_REPAINT = &H100000
Public Const TFLAG2_KEEP_PRINTER_OPEN = &H200000
Public Const TFLAG2_ALT_PARA_SYM = &H400000
Public Const TFLAG2_ALT_LINE_SYM = &H800000
Public Const TFLAG2_NO_LINE_FITTING = &H1000000
Public Const TFLAG2_NO_PRT_CANCEL_DLG = &H2000000
Public Const TFLAG2_INDENT_FRAMES = &H4000000
Public Const TFLAG2_INDENT_TABLES = &H8000000
Public Const TFLAG2_NO_ADJUST_CURSOR = &H10000000
Public Const TFLAG2_CURSOR_BEF_HIDDEN = &H20000000
Public Const TFLAG2_NO_CURSOR_ON_PROTECT = &H40000000

Public Const TFLAG3_WRAP_SPACES = &H1
Public Const TFLAG3_NO_EDIT_TABLE_COL = &H2
Public Const TFLAG3_TABLE_STATUS_LINE = &H4
Public Const TFLAG3_PLAIN_TABLE_BORDER = &H8
Public Const TFLAG3_GRAY_READ_ONLY = &H10
Public Const TFLAG3_CURSOR_IN_CELL = &H20
Public Const TFLAG3_EXACT_CELL_WIDTH = &H40
Public Const TFLAG3_NO_SCROLL = &H80
Public Const TFLAG3_NO_FULL_CELL_COPY = &H100
Public Const TFLAG3_HTML_CONT_TABLE = &H200
Public Const TFLAG3_SELECT_FIRST_FIELD = &H400
Public Const TFLAG3_MULTIPLE_RTF_GROUPS = &H800
Public Const TFLAG3_OLD_WORD_FORMAT = &H1000
Public Const TFLAG3_EMBEDDED_TABLES = &H2000
Public Const TFLAG3_DATA_FIELD_INPUT = &H4000
Public Const TFLAG3_GET_BUF_HDR_FTR = &H8000&
Public Const TFLAG3_NO_RTF_BKND_COLOR = &H20000
Public Const TFLAG3_NO_SAVE_UNDO = &H40000
Public Const TFLAG3_LARGE_PARA_BORDER = &H80000
Public Const TFLAG3_STYLES_ON_TOOLBAR = &H100000
Public Const TFLAG3_LINE_SCROLL = &H400000
Public Const TFLAG3_PRINT_BKND_PICT = &H800000
Public Const TFLAG3_CLIP_CELL_OVERFLOW = &H2000000
Public Const TFLAG3_EXACT_SCREEN_FONT = &H4000000
Public Const TFLAG3_ZERO_CELL_HEIGHT = &H8000000
Public Const TFLAG3_READ_PNG = &H10000000
Public Const TFLAG3_NO_TEXT_COLOR_ADJ = &H20000000
Public Const TFLAG3_NO_MOUSE_SEL = &H40000000

Public Const TFLAG4_COUNT_PCHAR_AS_CRLF = &H1
Public Const TFLAG4_SKIP_PROT_TEXT = &H2
Public Const TFLAG4_HIDE_HIDDEN_PARA_MARK = &H4
Public Const TFLAG4_READONLY_CONTROLS = &H8
Public Const TFLAG4_NO_REPAGINATE = &H10
Public Const TFLAG4_SMOOTH_SCROLL = &H20
Public Const TFLAG4_TEXT_HIDDEN = &H80
Public Const TFLAG4_AUTO_SPELL = &H100
Public Const TFLAG4_BINARY_RTF_PICT = &H200
Public Const TFLAG4_UNDO_WINDOW_OVERFLOW = &H400
Public Const TFLAG4_IME_UNICODE = &H800
Public Const TFLAG4_MOD_END_MARK_FONT = &H1000
Public Const TFLAG4_ONE_ROW_TOOLBAR = &H2000
Public Const TFLAG4_NO_OLE_DROP = &H4000
Public Const TFLAG4_ALWAYS_INVOKE_OLE = &H10000
Public Const TFLAG4_DISABLE_DATE_UPDATE = &H20000
Public Const TFLAG4_SAVE_BMP_AS_PNG = &H40000
Public Const TFLAG4_SAVE_SHAPE_WITH_DRAW_OBJECT = &H80000
Public Const TFLAG4_HTML_INPUT = &H100000
Public Const TFLAG4_NO_DRAG_PROT_TEXT = &H200000
Public Const TFLAG4_FULL_DRAG_PROT_TEXT = &H400000
Public Const TFLAG4_NO_MERGE_TABLE = &H800000
Public Const TFLAG4_NO_TOC_UPDATE = &H1000000
Public Const TFLAG4_NO_RESET_DC = &H2000000
Public Const TFLAG4_NO_SHARE_BORDER = &H4000000
Public Const TFLAG4_ADJ_LEFT_TABLE_COL = &H8000000
Public Const TFLAG4_DONT_FIX_NEG_INDENT = &H10000000
Public Const TFLAG4_PASTE_LAST_PARA_PROP = &H20000000
Public Const TFLAG4_PRINT_WMF_AS_BMP = &H40000000

Public Const TFLAG5_NO_EXT_DROP = &H1
Public Const TFLAG5_GROUP_UNDO = &H2
Public Const TFLAG5_NO_EXACT_ROW_HEIGHT = &H4
Public Const TFLAG5_RTL_CURSOR = &H8
Public Const TFLAG5_NO_KB_SEL = &H10
Public Const TFLAG5_WRITE_DOB = &H20
Public Const TFLAG5_NO_OBJ_IN_STATUS_LINE = &H40
Public Const TFLAG5_NO_CLEAR_SPL_HIST = &H80
Public Const TFLAG5_NO_NORMALIZE_FNOTE = &H100
Public Const TFLAG5_INPUT_TO_UNICODE = &H200
Public Const TFLAG5_NO_NORMALIZE_FIELD = &H400
Public Const TFLAG5_BEF_AND_AFT_HIDDEN = &H800
Public Const TFLAG5_NO_DRAW_IMAGE = &H1000
Public Const TFLAG5_SHOW_PAGE_SETUP = &H2000
Public Const TFLAG5_FULL_REPAGINATE = &H4000
Public Const TFLAG5_PNG_RGB = &H8000&
Public Const TFLAG5_NO_SHOW_SPACE_SYM = &H10000
Public Const TFLAG5_OLD_HLINK = &H20000
Public Const TFLAG5_NO_DRAG_ROW_LINE = &H40000
Public Const TFLAG5_NO_SHARE = &H80000
Public Const TFLAG5_SHOW_PAGE_BREAK = &H100000
Public Const TFLAG5_VARIABLE_PAGE_SIZE = &H200000
Public Const TFLAG5_SAVE_PICT_AS_WMF = &H400000
Public Const TFLAG5_NO_DRAG_CELL_LINE = &H800000
Public Const TFLAG5_RULER_INDENT_FIXED = &H1000000
Public Const TFLAG5_TOP_ROW_TOOLBAR = &H2000000
Public Const TFLAG5_NO_ADJ_FOR_TABLE = &H4000000
Public Const TFLAG5_UNLIMITED_OLE_SPACE = &H8000000
Public Const TFLAG5_OLD_RULER = &H10000000
Public Const TFLAG5_FRAME_TEXT_ONLY = &H20000000
Public Const TFLAG5_PROTECT_DATA_FIELD = &H40000000

Public Const TFLAG6_WRITE_DBCS = &H2
Public Const TFLAG6_WRITE_DEFAULT_COLOR = &H4
Public Const TFLAG6_HI_RES = &H8
Public Const TFLAG6_DONT_WRITE_PICT_PATH = &H10
Public Const TFLAG6_DONT_PROCESS_TAB = &H20
Public Const TFLAG6_SHOW_PICT_IN_PIXEL_SIZE = &H40
Public Const TFLAG6_DONT_PROCESS_BULLET_KEYS = &H80
Public Const TFLAG6_IN_PLACE_ACTIVATE = &H400
Public Const TFLAG6_ALLOW_CELL_OVERFLOW = &H800
Public Const TFLAG6_INSERT_DROP_PICT_AS_LINK = &H1000
Public Const TFLAG6_WRAP_AT_WINDOW_WIDTH = &H2000
Public Const TFLAG6_SAVE_TEXT_BK_COLOR = &H4000
Public Const TFLAG6_LIST_TO_TEXT_IN_HTML = &H8000&
Public Const TFLAG6_NO_LINK_MSG = &H20000
Public Const TFLAG6_NO_TRACK_MSG = &H40000
Public Const TFLAG6_PRINT_EMF_AS_BMP = &H200000
Public Const TFLAG6_MBCS_HTML_OUTPUT = &H2000000
Public Const TFLAG6_SWAP_CR_LINE_BREAK = &H4000000
Public Const TFLAG6_USE_ANSI_FONT = &H8000000
Public Const TFLAG6_DEL_CELL_TEXT = &H20000000
Public Const TFLAG6_RIGHT_JUST_RTL = &H40000000

Public Const TFLAG7_NO_RTL_FONT = &H1
Public Const TFLAG7_AUTO_NEW_ROW = &H10
Public Const TFLAG7_HIDE_TC_FIELD = &H20
Public Const TFLAG7_SKIP_WORD_WRAP = &H40
Public Const TFLAG7_DRAW_OLD_VSCROLL = &H80
Public Const TFLAG7_NO_TRACK_CHANGE_LINE = &H400
Public Const TFLAG7_SHRINK_PICT_TO_PAGE = &H800
Public Const TFLAG7_AUTO_PARA_RTL = &H2000
Public Const TFLAG7_SHOW_SPACES_AT_PARA_END = &H4000
Public Const TFLAG7_DISABLE_RULER = &H8000
Public Const TFLAG7_AUTO_SET_RTL = &H10000
Public Const TFLAG7_ALWAYS_FIRE_MODIFY = &H20000
Public Const TFLAG7_WRITE_LISTTEXT = &H40000
Public Const TFLAG7_SET_BOX_CLIPPING = &H200000
Public Const TFLAG7_PASTE_OBJECT = &H400000            ' paste ole object from clipboard if available
Public Const TFLAG7_NO_SPELLCHECK_FIELDS = &H800000
Public Const TFLAG7_RECORD_CUR_PARA_PROPS = &H2000000  ' TRUE to record current paragrah attribute in the style being recorded
Public Const TFLAG7_RECORD_CUR_CHAR_PROPS = &H4000000  ' TRUE to record current character attribute in the style being recorded
Public Const TFLAG7_NO_INTERNET = &H10000000           ' Disable internet access
Public Const TFLAG7_NO_TABLE_AUTO_WIDTH = &H20000000   ' Disable table auto-width feature

Public Const TFLAG8_AUTO_REFORMAT_TABLES = &H1
Public Const TFLAG8_HIDE_EMPTY_CELLS_ON_PRINT = &H2   ' hide empty cells when printing the document
Public Const TFLAG8_DONT_SELECT_LAST_CHAR = &H4       ' don't select the last character of the document on select_all
Public Const TFLAG8_ENABLE_GDIPLUS = &H8              ' enable gdi plus
Public Const TFLAG8_FIX_NEG_INDENT = &H20             ' fix negative indent during rtf read
Public Const TFLAG8_IGNORE_LASTROW = &H40             ' ignore the \lastrow rtf tag
Public Const TFLAG8_HIDE_PAGE_BLANK_AREA = &H80    ' for short documents hide the display of non-text area by hiding the vertical scroll bar
Public Const TFLAG8_NO_BOX_CLIPPING = &H200        ' do not clip horizontal text/table overflowing a frame
Public Const TFLAG8_WRAP_ON_HYPHEN = &H400         ' word wrap on hyphen
Public Const TFLAG8_INSERT_ROWS_ON_PASTE = &H1000    ' insert the table rows on paste instead of overlaying it
Public Const TFLAG8_COMP_V14 = &H2000                ' read sse file generated by TE v14.0.42 and TE 14.0.43 (revid=65)
Public Const TFLAG8_NO_TWIPS = &H4000                ' translate certain dialog units from twips to inches/cm
Public Const TFLAG8_GET_MOUSELEAVE = &H10000         ' Get ACTION_MOUSELEAVE message in the preprocess event when mouse leaves the client area of the control
Public Const TFLAG8_DONT_SPELL_CHECK_HDR_FTR = &H2000000  ' don't spell check header/footer
Public Const TFLAG8_GET_TRACKING_CODES = &H4000000         'get tracking code unconditionally
Public Const TFLAG8_NO_GDIPLUS_FOR_EMF = &H8000000         'don't use GDI plus for emf display
Public Const TFLAG8_HIDE_PPV_EDIT_BUTTON = &H10000000     ' hide the print-preview close/edit button
Public Const TFLAG8_ALLOW_TEXT_BEF_PROT_FIELD = &H20000000   ' allow text before the protected field
Public Const TFLAG8_DONT_USE_KB_LANG = &H40000000            ' don't apply kb font to inserted text

Public Const TFLAG9_SKIP_STRIKE_TEXT = &H1             ' don't write strike/dbl-strike text to plain clipboard text
Public Const TFLAG9_FIRE_FONT_CHECK = &H2        ' fire the OverrideFont event
Public Const TFLAG9_NO_NESTED_TABLE_WIDTH_ADJ = &H4     ' don't adjust the width of the nested tables to fit into the main table
Public Const TFLAG9_WRAP_LONG_HTML_WORD = &H8           ' wrap a long word in a fixed with html cell by allowing the word to wrap instead of cell to widen
Public Const TFLAG9_TREAT_DATA_FIELD_AS_ATOM = &H10     ' tream data-field as an atom
Public Const TFLAG9_NO_COMMENTS = &H20                  ' dont support comments
Public Const TFLAG9_OLD_TABLE_WIDTH_CALC = &H40         ' used old table width calculations to be compatible with TE 17.0.4.5
Public Const TFLAG9_SHRINK_LIST_TABLE = &H80            ' shrink the list table during the rtf output
Public Const TFLAG9_ALWAYS_WRITE_ROW_PROPS = &H100      ' always write row properties
Public Const TFLAG9_NO_SHADE_DYNAMIC_FIELDS = &H200     ' don't shade the dynamic fields
Public Const TFLAG9_SAME_CURSOR_POS_AFTER_ZOOM = &H400  ' don't let the cursor position change after zooming
Public Const TFLAG9_ALWAYS_FIRE_STATUS_EVENT = &H800    ' always fire status event
Public Const TFLAG9_ALWAYS_EMBED_TABLES = &H1000        ' always embed tables during clipboard paste
Public Const TFLAG9_NEW_RTF_LISTS = &H2000              ' create new set of lists when rtf data is pasted
Public Const TFLAG9_TOC_TO_TEXT = &H4000                ' convert table-of-content to plain text
Public Const TFLAG9_CONVERT_COMBO_BOX = &H8000          ' convert box-box to plain-text showing the combo-box selection string
Public Const TFLAG9_DONT_PASTE_TAGS = &H10000           ' don't paste tags and bookmarks
Public Const TFLAG9_DONT_COLOR_PARA_SPACING = &H100000  ' don't apply color to the paragarph before and after space
Public Const TFLAG9_WORD2007_PAGE_BREAK = &H200000      ' Word 2007 compatible page breaks
Public Const TFLAG9_FORCE_STYLE = &H400000              ' foce the style attributes
Public Const TFLAG9_FIRE_ADJUST_COLOR = &H10000000      ' fire the adjust color event
Public Const TFLAG9_HIDE_PRINT_BUTTON = &H20000000      ' hide the print button on the print-preview bar
Public Const TFLAG9_INVOKE_HYPERLINK = &H40000000       ' automatically invoke the hyperlink

Public Const TFLAG10_DONT_MARK_WITH_SEL_COL = &H1        ' 2014
Public Const TFLAG10_DONT_USE_BKSP_FONT     = &H2        ' don't use the backspace font
Public Const TFlAG10_DONT_PAD_TABLE_HEIGHT  = &H4        ' don't add the bottom padding to the exact height table rows
Public Const TFLAG10_MERGE_NESTED_RTF_PROPS = &H8        ' merge nested rtf color tables
Public Const TFLAG10_EXTEND_AUTO_VSCROLL  = &H10         ' extend the auto-vertical-scroll bar feature
Public Const TFLAG10_NO_HLINK_BOOKMARK    = &H20         ' do not generate bookmark for internal hyperlinks
Public Const TFLAG10_NO_LAST_PARA_MARKER  = &H40         ' don't write the last para-markte to the rtf file
Public Const TFLAG10_DONT_COMBINE_UNDOS   = &H80         ' don't combine undos
Public Const TFLAG10_AUTO_HSCROLL_BAR     = &H100        ' automatic horizontal scroll bar
Public Const TFLAG10_DOTTED_GRID_LINES    = &H200        ' show the dotted table grid lines
Public Const TFLAG10_NO_CRLF                 = &H400         ' don't insert cr/lf in the RTF text
Public Const TFLAG10_WRITE_FIX_WIDTH_TABLE   = &H800         ' disard auto-width property when writing RTF
Public Const TFLAG10_USE_LAST_PARA_PROPS    = &H1000         ' When last paragraph marker is deleted upon RTF read, use its property for the resulting last paragraph
Public Const TFLAG10_WRITE_DOCX_CUSTOM_TAGS = &H2000         ' write custom tags to support ss tags such as AuxId,
Public Const TFLAG10_WRITE_RANDOM_LIST_TMPL_ID = &H4000      ' randomize the list template id when writing the RTF output
Public Const TFLAG10_DST                       = &H8000      ' enable dst specific changes
Public Const TFLAG10_LOCK_DATA_FIELD          = &H10000      ' write the fldlock tag for the data fields
Public Const TFLAG10_LEGACY_SECT_PROPS        = &H20000      ' restore section properties input to pre 20140116
Public Const TFLAG10_SHRINK_RTF_IMAGES        = &H40000      ' shrink images to fit during rtf input
Public Const TFLAG10_PREFER_PLACEHOLDER_PICT  = &H80000      ' use placeholder pictures if available for the linked images
Public Const TFLAG10_NO_PICT_READ_MSG         = &H100000     ' do not show the message encountered during picture data import error

Public Const TFLAG11_NO_AUTO_PARA_STYLE_ON_TEXT  = &H1       ' don't automcatically apply paragraph style on text (during word-wrapping)
Public Const TFLAG11_DONT_SHRINK_FONT_TABLE      = &H2       ' don't shrink the font table when an editor window closes
Public Const TFLAG11_NO_SHPPICT                  = &H4       ' do not write the shppict tag
Public Const TFLAG11_NO_EXACT_LINE_SPACING       = &H8       ' do not honor exact line height
Public Const TFLAG11_NO_CHAR_BKND                = &H10      ' do not read \chcpbat tag
Public Const TFLAG11_NO_BAD_PTR_CHECK            = &H20      ' don't use the IsBadReadPtr or IsBadWritePtr flags
Public Const TFLAG11_NO_PASTE_PAPER_PROPS        = &H40      ' do not paste section paper poperties
Public Const TFLAG11_NO_ALTERNATING_BULLETS      = &H80      ' don't alternate bullet/hollow-bullet for the list levels
Public Const TFLAG11_ALWAYS_ENABLE_NEW_CMD       = &H100      ' alwasy enable the ID_NEW command
Public Const TFLAG11_DONT_KEEP_TOGETHER_LONG_TABLES = &H200  ' turn-off keep-row-together for long tables
Public Const TFLAG11_DONT_BALANCE_FAR_EAST_TEXT  = &H400     ' don't balance far-east text
Public Const TFLAG11_NO_GIF_ANIM                 = &H800     ' disable animiation of gif files
Public Const TFLAG11_NO_PREF_WIDTH_CALC          = &H1000    ' do not apply preferable width calculation for the tables during RTF read
Public Const TFLAG11_NBRS_TO_LEFT                = &H2000    ' move the large number in a old number list toward left (instead of right)
Public Const TFLAG11_DONT_FIX_RTF_TABLE          = &H4000    ' don't fix table to text, or text to table error in RTF


Public Const LFLAG_PARA = &H1                ' paragraph or cell break line
Public Const LFLAG_BREAK = &H2               ' any other break line
Public Const LFLAG_PARA_FIRST = &H4          ' first para line
Public Const LFLAG_CONTROL = &H8             ' line has embedded control
Public Const LFLAG_FNOTE = &H10              ' contains a footnote
Public Const LFLAG_SOFT_COL = &H20           ' soft column break
Public Const LFLAG_NBSPACE = &H40            ' line has non-break space characters
Public Const LFLAG_LINE = &H80               ' line break
Public Const LFLAG_HTML_RULE = &H100         ' is html horizontal rule
Public Const LFLAG_BOX_TOP = &H200           ' draw top para border before this line
Public Const LFLAG_BOX_BOT = &H400           ' draw bot para border before this line
Public Const LFLAG_SECT = &H800              ' section break line
Public Const LFLAG_RHDR = &H1000             ' right page header
Public Const LFLAG_NBDASH = &H2000           ' line has non-break dash characters
Public Const LFLAG_PICT = &H4000             ' line contains an aligned picture
Public Const LFLAG_RFTR = &H8000&             ' right footer
Public Const LFLAG_FNOTETEXT = &H10000       ' contains a footnote text
Public Const LFLAG_FHDR = &H20000            ' fist page hdr
Public Const LFLAG_FFTR = &H40000            ' fist page ftr
Public Const LFLAG_HDR = &H80000             ' regular page hdr
Public Const LFLAG_FTR = &H100000            ' regular page ftr
Public Const LFLAG_HYPH = &H200000           ' regular page ftr
Public Const LFLAG_LHDR = &H400000           ' left header
Public Const LFLAG_LFTR = &H800000           ' left header
Public Const LFLAG_TOC = &H1000000            ' has table of contents
Public Const LFLAG_LIST = &H2000000           ' line contains the list number to display
Public Const LFLAG_HPARA = &H4000000          ' line contains a hidden para marker
Public Const LFLAG_LISTNUM = &H8000000        ' has list number field in it
Public Const LFLAG_SELECTED = &H10000000      ' result of LineSelected function
Public Const LFLAG_ASSUMED_TAB = &H20000000   ' this cell line assumes a decimal tab in the beginning of the line
Public Const LFLAG_AUTONUMLGL = &H40000000    ' has an autonumlgl field in the line

Public Const INFO_TAB = &H1
Public Const INFO_SECT = &H2
Public Const INFO_PAGE = &H4
Public Const INFO_COL = &H8
Public Const INFO_CELL = &H10
Public Const INFO_ROW = &H20
Public Const INFO_TABLE = &H40
Public Const INFO_JUST = &H80
Public Const INFO_FRAME = &H400
Public Const INFO_SPACE_LINE = &H800
Public Const INFO_PAGE_NUMBER = &H1000

Public Const REL_SCREEN = 0
Public Const REL_WINDOW = 1
Public Const REL_TEXT_BOX = 2

Public Const ACTION_COMMAND = 1
Public Const ACTION_VSCROLL = 2
Public Const ACTION_HSCROLL = 3
Public Const ACTION_CHAR = 4
Public Const ACTION_LBUTTONDOWN = 5
Public Const ACTION_RBUTTONDOWN = 6
Public Const ACTION_LBUTTONUP = 7
Public Const ACTION_RBUTTONUP = 8
Public Const ACTION_LBUTTONDBLCLK = 9
Public Const ACTION_RBUTTONDBLCLK = 10
Public Const ACTION_SIZE = 11
Public Const ACTION_SETFOCUS = 12
Public Const ACTION_KILLFOCUS = 13
Public Const ACTION_MOUSEMOVE = 14
Public Const ACTION_QUERYENDSESSION = 15
Public Const ACTION_CHECKBOX = 16
Public Const ACTION_MOUSELEAVE = 17
Public Const ACTION_MBUTTONDOWN = 18
Public Const ACTION_MBUTTONUP = 19
Public Const ACTION_MBUTTONDBLCLK = 20
Public Const ACTION_ROW_INDENT = 21
Public Const ACTION_ROW_HEIGHT = 22
Public Const ACTION_CELL_WIDTH = 23
Public Const ACTION_PICT_SIZE = 24
Public Const ACTION_FRAME_SIZE = 25
Public Const ACTION_REPLACESEL = 26
Public Const ACTION_DRAG_DEL = 27
Public Const ACTION_DRAGON = 28

Public Const BLT_ROUND = 1                        ' 20101228: incremented the values so that 0 is not used for BLT_ROUND
Public Const BLT_DIAMOND = 2
Public Const BLT_SQUARE = 3
Public Const BLT_HOLLOW_SQUARE = 4
Public Const BLT_4_DIAMONDS = 5
Public Const BLT_ARROW = 6
Public Const BLT_CHECK = 7

Public Const BLTFLAG_HIDDEN = &H1

Public Const NBR_DEC = 0
Public Const NBR_UPR_ALPHA = 1
Public Const NBR_LWR_ALPHA = 2
Public Const NBR_UPR_ROMAN = 3
Public Const NBR_LWR_ROMAN = 4

Public Const PID_LINE = 0
Public Const PID_PARA = 1
Public Const PID_BULLET = 2
Public Const PID_TAB = 3
Public Const PID_STYLE = 4

Public Const CFLAG_FIX_WIDTH = &H100
Public Const CFLAG_FIX_WIDTH_PCT = &H200
Public Const CFLAG_VALIGN_CTR = &H1000
Public Const CFLAG_VALIGN_BOT = &H2000
Public Const CFLAG_VALIGN_BASE = &H10000

Public Const SCOPE_BEGIN = 0
Public Const SCOPE_FORWARD = 1
Public Const SCOPE_BACKWARD = 2
Public Const SCOPE_ANY = 3

Public Const PARA_FRAME_HPAGE = &H1
Public Const PARA_FRAME_USED = &H2
Public Const PARA_FRAME_RIGHT_JUST = &H4
Public Const PARA_FRAME_CENTER = &H8
Public Const PARA_FRAME_SET_WIDTH = &H10
Public Const PARA_FRAME_VPAGE = &H20
Public Const PARA_FRAME_VMARG = &H40
Public Const PARA_FRAME_TEXT_BOX = &H80
Public Const PARA_FRAME_LINE = &H100
Public Const PARA_FRAME_RECT = &H200
Public Const PARA_FRAME_BOXED = &H400
Public Const PARA_FRAME_DOTTED = &H800
Public Const PARA_FRAME_SELECT = &H1000
Public Const PARA_FRAME_NO_WRAP = &H2000
Public Const PARA_FRAME_WRAP_THROUGH = &H4000
Public Const PARA_FRAME_POSITIONED = &H8000&
Public Const PARA_FRAME_FILL_PICT = &H800000

Public Const PF2_END_ARROW = &H1                ' draw arrow head at the end point
Public Const PF2_START_ARROW = &H2              ' draw arrow head at the start point
Public Const PF2_FLIPH = &H4                    ' indicates a horizontal flip
Public Const PF2_FLIPV = &H8                    ' indicates a vertical flip
Public Const PF2_VBOTTOM = &H10                 ' bottom aligned frame
Public Const PF2_PVPARA = &H20                  ' set when \pvpara encountered
Public Const PF2_CANVAS = &H40                  ' is canvas
Public Const PF2_INLINE = &H80                  ' inline
Public Const PF2_HTML_RULE = &H100              ' html ruler
Public Const PF2_ANCHOR_IN_CELL = &H200         ' anchor for this shape is inside a table cell
Public Const PF2_SET_HEIGHT = &H400             ' set height for the frame automatically
Public Const PF2_HIDDEN = &H800                 ' hidden para-frame
Public Const PF2_LEFT = &H1000                  ' left justified
Public Const PF2_NO_DELETE = &H2000             ' do not allow deletion of this frame
Public Const PF2_NO_MOVE = &H4000               ' do not allow movement
Public Const PF2_NO_SIZE = &H8000               ' do not allow sizing

Public Const SECT_ALL = -1
Public Const SECT_CUR = -2

Public Const PARAM_IGNORE = -31234

Public Const FIELD_PAGE_NUMBER = 1
Public Const FIELD_TEXTBOX = 2
Public Const FIELD_CHECKBOX = 3
Public Const FIELD_LISTBOX = 4
Public Const FIELD_PAGE_COUNT = 5
Public Const FIELD_NAME = 6
Public Const FIELD_DATA = 7
Public Const FIELD_DATE = 8
Public Const FIELD_TOC = 9
Public Const FIELD_PRINTDATE = 10
Public Const FIELD_LISTNUM = 11
Public Const FIELD_AUTONUMLGL = 12
Public Const FIELD_TC = 13
Public Const FIELD_HLINK = 14
Public Const FIELD_XE = 15
Public Const FIELD_PAGE_REF = 16
Public Const FIELD_SECT_PAGE_COUNT = 17

Public Const TER_FIRST = 0
Public Const TER_LAST = 1
Public Const TER_NEXT = 2
Public Const TER_PREV = 4
Public Const TER_CUR = 5

Public Const WC_SELECTION = &H1
Public Const WC_INCLUDE_HDR_FTR = &H2
Public Const WC_INCLUDE_HIDDEN = &H4

Public Const TERTAG_USER = 0
Public Const TERTAG_BKM = 1


Public Const LIST_DEC = 0
Public Const LIST_UPR_ROMAN = 1
Public Const LIST_LWR_ROMAN = 2
Public Const LIST_UPR_ALPHA = 3
Public Const LIST_LWR_ALPHA = 4
Public Const LIST_ORDINAL = 5
Public Const LIST_CARDINAL = 6
Public Const LIST_ORDINAL_TEXT = 7
Public Const LIST_DEC_PAD = 22
Public Const LIST_BLT = 23
Public Const LIST_NO_NUM = 255

Public Const LISTFLAG_RESTART_SEC = &H1

Public Const LISTAFT_TAB = 0
Public Const LISTAFT_SPACE = 1
Public Const LISTAFT_NONE = 2

Public Const LISTLEVEL_RESTART = &H1
Public Const LISTLEVEL_OLD = &H2
Public Const LISTLEVEL_RESTARTED = &H4
Public Const LISTLEVEL_LEGAL = &H8
Public Const LISTLEVEL_REFORMAT = &H10
Public Const LISTLEVEL_NO_RESET = &H20

Rem *****************************************************************************
Rem  Constants used to send command message to the TER window.  When using
Rem  the editor as a VBX, you can provide these constants to the 'Command'
Rem  property.
Rem ******************************************************************************
Public Const ID_PGUP = 600
Public Const ID_PGDN = 601
Public Const ID_UP = 602
Public Const ID_DOWN = 603
Public Const ID_LEFT = 604
Public Const ID_RIGHT = 605
Public Const ID_DEL = 606
Public Const ID_TAB = 608
Public Const ID_BACK_TAB = 609
Public Const ID_LINE_BEGIN = 610
Public Const ID_LINE_END = 611
Public Const ID_FILE_BEGIN = 612
Public Const ID_FILE_END = 613
Public Const ID_CTRL_TAB = 614
Public Const ID_INS_AFT = 615
Public Const ID_INS_BEF = 616
Public Const ID_DEL_LINE = 617
Public Const ID_SPLIT_LINE = 618
Public Const ID_JOIN_LINE = 619
Public Const ID_NEXT_WORD = 620
Public Const ID_PREV_WORD = 621
Public Const ID_HILIGHT_LINE = 622
Public Const ID_BLOCK_COPY = 623
Public Const ID_BLOCK_MOVE = 624
Public Const ID_SELECT_ALL = 625
Public Const ID_NEW = 626
Public Const ID_OPEN = 627
Public Const ID_CUT = 628
Public Const ID_COPY = 629
Public Const ID_PASTE = 630
Public Const ID_PASTE_SPEC = 631

Public Const ID_PICT_FROM_FILE = 632
Public Const ID_EMBED_PICT = 632

Public Const ID_SEARCH = 633
Public Const ID_SEARCH_FOR = 634
Public Const ID_SEARCH_BACK = 635
Public Const ID_REPLACE = 636
Public Const ID_TER_HELP = 637
Public Const ID_UNDO = 638
Public Const ID_INSERT = 639
Public Const ID_SAVE = 640
Public Const ID_SAVEAS = 641
Public Const ID_QUIT = 642
Public Const ID_PRINT = 643
Public Const ID_PAGE_OPTIONS = 644
Public Const ID_PRINT_OPTIONS = 645
Public Const ID_JUMP = 646

Public Const ID_CHAR_NORMAL = 647
Public Const ID_BOLD_ON = 648
Public Const ID_ULINE_ON = 649
Public Const ID_ITALIC_ON = 650
Public Const ID_STRIKE_ON = 651
Public Const ID_SUPSCR_ON = 652
Public Const ID_SUBSCR_ON = 653

Public Const ID_COLOR = 654

Public Const ID_FONTS = 655

Public Const ID_PARA_NORMAL = 656
Public Const ID_CENTER = 657
Public Const ID_RIGHT_JUSTIFY = 658
Public Const ID_LEFT_INDENT = 659
Public Const ID_RIGHT_INDENT = 660
Public Const ID_DOUBLE_SPACE = 661
Public Const ID_HANGING_INDENT = 662
Public Const ID_JUSTIFY = 663

Public Const ID_TAB_CLEAR = 666
Public Const ID_TAB_CLEAR_ALL = 667

Public Const ID_PAGE_BREAK = 670
Public Const ID_REPAGINATE = 671
Public Const ID_SECT_BREAK = 672
Public Const ID_SECT_OPTIONS = 673
Public Const ID_PAGE_MODE = 674
Public Const ID_COL_BREAK = 675
Public Const ID_VIEW_HDR_FTR = 676
Public Const ID_EDIT_HDR_FTR = 677

Public Const ID_RULER = 680
Public Const ID_TOOL_BAR = 681
Public Const ID_STATUS_RIBBON = 682

Public Const ID_EDIT_PICT = 685
Public Const ID_SHOW_HIDDEN = 686
Public Const ID_HIDDEN_ON = 687
Public Const ID_ULINED_ON = 688
Public Const ID_PROTECT_ON = 689
Public Const ID_PROTECTION_LOCK = 690

Public Const ID_PARA_BORDER = 691
Public Const ID_SHOW_PARA_MARK = 692
Public Const ID_INSERT_OBJECT = 693

Public Const ID_TABLE_INSERT = 694
Public Const ID_TABLE_INSERT_ROW = 695
Public Const ID_TABLE_SPLIT_CELL = 696
Public Const ID_TABLE_MERGE_CELLS = 697
Public Const ID_TABLE_DEL_CELLS = 698
Public Const ID_TABLE_SHOW_GRID = 699
Public Const ID_TABLE_ROW_POS = 700
Public Const ID_TABLE_CELL_BORDER = 701
Public Const ID_TABLE_CELL_SHADE = 702
Public Const ID_TABLE_ROW_HEIGHT = 703
Public Const ID_TABLE_INSERT_COL = 704
Public Const ID_TABLE_SPLIT_CELL_VERT = 705

Public Const ID_SHOW_HYPERLINK_CURSOR = 710
Public Const ID_BK_COLOR = 711

Public Const ID_CTRL_UP = 715
Public Const ID_CTRL_DOWN = 716
Public Const ID_PRINT_PREVIEW = 717

Public Const ID_INSERT_PARA_FRAME = 718
Public Const ID_INSERT_PAGE_NUMBER = 719

Public Const ID_PARA_SPACING = 720
Public Const ID_INSERT_FNOTE = 721
Public Const ID_EDIT_FNOTE = 722
Public Const ID_PARA_KEEP = 723
Public Const ID_PARA_KEEP_NEXT = 724
Public Const ID_BOX_ON = 725
Public Const ID_INSERT_DRAW_OBJECT = 726

Public Const ID_EDIT_OLE = 727
Public Const ID_SNAP_TO_GRID = 728
Public Const ID_BULLET = 729

Public Const ID_EDIT_STYLE = 730
Public Const ID_CHAR_STYLE = 731
Public Const ID_PARA_STYLE = 732
Public Const ID_ZOOM = 733
Public Const ID_TAB_SET = 734
Public Const ID_FRAME_YBASE = 735
Public Const ID_EDIT_DOB = 736
Public Const ID_BKND_PICT = 737
Public Const ID_LINK_PICT = 738
Public Const ID_FITTED_VIEW = 739
Public Const ID_INSERT_NBSPACE = 740
Public Const ID_SPELL = 741
Public Const ID_HLINK_ON = 742
Public Const ID_WIDOW_ORPHAN = 743
Public Const ID_SHOW_PAGE_BORDER = 744
Public Const ID_SHOW_LAYOUT = 744
Public Const ID_DEL_PREV_WORD = 745
Public Const ID_INSERT_NBDASH = 746
Public Const ID_REDO = 747
Public Const ID_PARA_NBR = 748
Public Const ID_PARA_BK_COLOR = 749
Public Const ID_TABLE_CELL_VALIGN = 750
Public Const ID_TABLE_SEL_COL = 751
Public Const ID_INSERT_PAGE_COUNT = 752
Public Const ID_INSERT_BOOKMARK = 753
Public Const ID_CREATE_FIRST_HDR = 754
Public Const ID_CREATE_FIRST_FTR = 755
Public Const ID_DELETE_FIRST_HDR = 756
Public Const ID_DELETE_FIRST_FTR = 757
Public Const ID_SHOW_FIELD_NAMES = 758
Public Const ID_INSERT_HYPH = 759
Public Const ID_CHAR_SPACE = 760
Public Const ID_INLINE_IME = 761
Public Const ID_TABLE_HDR_ROW = 762
Public Const ID_RETURN = 763
Public Const ID_TABLE_ROW_KEEP = 764
Public Const ID_TABLE_CELL_COLOR = 765
Public Const ID_INSERT_DATA_FIELD = 766
Public Const ID_INSERT_INPUT_FIELD = 767
Public Const ID_INSERT_CHECKBOX = 768
Public Const ID_EDIT_INPUT_FIELD = 769
Public Const ID_INSERT_DATE_TIME = 770
Public Const ID_INSERT_TOC = 771
Public Const ID_LEFT_JUSTIFY = 772
Public Const ID_PAGE_BREAK_BEFORE = 773
Public Const ID_CAPS_ON = 774
Public Const ID_SCAPS_ON = 775
Public Const ID_AUTO_SPELL = 776
Public Const ID_INSERT_ENOTE = 777
Public Const ID_EDIT_ENOTE = 778
Public Const ID_CREATE_LIST = 779
Public Const ID_EDIT_LIST = 780
Public Const ID_CREATE_LIST_OR = 781
Public Const ID_EDIT_LIST_OR = 782
Public Const ID_EDIT_LIST_LEVEL = 783
Public Const ID_PARA_LIST = 784
Public Const ID_LEFT_INDENT_DEC = 785
Public Const ID_TABLE_CELL_BORDER_COLOR = 786
Public Const ID_PASTE_TEXT = 787
Public Const ID_TABLE_CELL_WIDTH = 788
Public Const ID_FRAME_ROTATE_TEXT = 789
Public Const ID_PARA_RTL = 790
Public Const ID_TABLE_ROW_RTL = 791
Public Const ID_SECT_RTL = 792
Public Const ID_DOC_RTL = 793
Public Const ID_INSERT_HLINK = 794
Public Const ID_OVERRIDE_BIN = 795
Public Const ID_TRACK_CHANGES = 796
Public Const ID_ULINE_COLOR = 797
Public Const ID_LIST_LEVEL_INC = 798
Public Const ID_LIST_LEVEL_DEC = 799
Public Const ID_BORDER_MARGIN = 800
Public Const ID_PROTECT_FORM = 801
Public Const ID_WATERMARK = 802
Public Const ID_TABLE_CELL_VTEXT = 803
Public Const ID_NEXT_CHANGE = 804
Public Const ID_PREV_CHANGE = 805
Public Const ID_ACCEPT_CHANGE = 806
Public Const ID_ACCEPT_ALL_CHANGES = 807
Public Const ID_USER1 = 808
Public Const ID_USER2 = 809
Public Const ID_USER3 = 810
Public Const ID_USER4 = 811
Public Const ID_USER5 = 812
Public Const ID_USER6 = 813
Public Const ID_USER7 = 814
Public Const ID_USER8 = 815
Public Const ID_USER9 = 816
Public Const ID_DEL_NEXT_WORD = 817
Public Const ID_CHAR_SCALEX = 818
Public Const ID_REJECT_CHANGE = 819
Public Const ID_REJECT_ALL_CHANGES = 820
Public Const ID_VRULER = 821
Public Const ID_PARA_RTL_KEY = 822
Public Const ID_PARA_LTR_KEY = 823
Public Const ID_CREATE_RIGHT_HDR = 824
Public Const ID_CREATE_RIGHT_FTR = 825
Public Const ID_DELETE_RIGHT_HDR = 826
Public Const ID_DELETE_RIGHT_FTR = 827

Public Const ID_CREATE_LEFT_HDR = 828
Public Const ID_CREATE_LEFT_FTR = 829
Public Const ID_DELETE_LEFT_HDR = 830
Public Const ID_DELETE_LEFT_FTR = 831

Public Const ID_DOUBLE_STRIKE_ON = 832
Public Const ID_HIDE_CHANGES = 833
Public Const ID_INSERT_COMBOBOX = 834
Public Const ID_APPLY_COMMENT = 835
                                   
Public Const ID_NUM_TO_CHAR = 836

Public Const ID_PAINT_FORMAT       =837
Public Const ID_HILIGHT_TEXT       =838

Public Const ID_INSERT_OLE_FROM_FILE  =839




Public Const TLB_LINE = 1
Public Const TLB_TYPEFACE = 2
Public Const TLB_POINTSIZE = 3
Public Const TLB_BOLD = 4
Public Const TLB_ITALIC = 5
Public Const TLB_ULINE = 6
Public Const TLB_ALIGN_LEFT = 7
Public Const TLB_ALIGN_RIGHT = 8
Public Const TLB_ALIGN_CENTER = 9
Public Const TLB_ALIGN_JUSTIFY = 10
Public Const TLB_INC_INDENT = 11
Public Const TLB_DEC_INDENT = 12
Public Const TLB_STYLE = 13
Public Const TLB_ZOOM = 14
Public Const TLB_CUT = 15
Public Const TLB_COPY = 16
Public Const TLB_PASTE = 17
Public Const TLB_SPACER = 18
Public Const TLB_NEW = 19
Public Const TLB_OPEN = 20
Public Const TLB_SAVE = 21
Public Const TLB_PRINT = 22
Public Const TLB_HELP = 23
Public Const TLB_PAR = 24
Public Const TLB_PREVIEW = 25
Public Const TLB_NUMBER = 26
Public Const TLB_BULLET = 27
Public Const TLB_UNDO = 28
Public Const TLB_REDO = 29
Public Const TLB_FIND = 30
Public Const TLB_DATE = 31
Public Const TLB_PAGE_NUM = 32
Public Const TLB_PAGE_COUNT = 33
Public Const MAX_TLB = 34

Rem *****************************************************************************
Rem  Message ids
Rem ******************************************************************************
Public Const MSG_NO_ERROR = 0
Public Const MSG_BAD_BMP_FILE = 1
Public Const MSG_BAD_FNOTE_MARKER = 2
Public Const MSG_BAD_OBJ_SIZE = 3
Public Const MSG_BAD_PRINTER_DRV = 4
Public Const MSG_CELL_DATA_MISSING = 5
Public Const MSG_CELL_WITHOUT_ROW = 6
Public Const MSG_CHARSTYLE_IN_USE = 7
Public Const MSG_CHAR_FMT_MISSING = 8
Public Const MSG_CLIPBOARD_BUSY = 9
Public Const MSG_CLIPBOARD_NO_DATA = 10
Public Const MSG_CLIPBOARD_NO_FMT = 11
Public Const MSG_COUNT_MISMATCH = 12
Public Const MSG_CREATE_NEW_FILE = 13
Public Const MSG_END_BACKWARD_SEARCH = 14
Public Const MSG_END_FORWARD_SEARCH = 15
Public Const MSG_ERR_ADDING_STRING = 16
Public Const MSG_ERR_ADDING_VALUE = 17
Public Const MSG_ERR_ADVISE_CONNECT = 18
Public Const MSG_ERR_ADV_CREATE = 19
Public Const MSG_ERR_BLOCK_SIZE = 20
Public Const MSG_ERR_BMP_CREATE = 21
Public Const MSG_ERR_CTL_CREATE = 22
Public Const MSG_ERR_DATA_RETRIEVE = 23
Public Const MSG_ERR_DIB_CREATE = 24
Public Const MSG_ERR_END_PAGE = 25
Public Const MSG_ERR_END_PRINTER = 26
Public Const MSG_ERR_FILE_LENGTH = 27
Public Const MSG_ERR_FILE_OPEN = 28
Public Const MSG_ERR_FILE_READ = 29
Public Const MSG_ERR_FILE_SEEK = 30
Public Const MSG_ERR_FILE_WRITE = 31
Public Const MSG_SEL_PROTECTED = 32
Public Const MSG_SPELL_OVER = 33
Public Const MSG_STYLESHEET_MISSING = 34
Public Const MSG_TAB_TBL_MISSING = 35
Public Const MSG_TBL_DATA_MISSING = 36
Public Const MSG_TYPE_STYLE_NAME = 37
Public Const MSG_UNDO_EMPTY = 38
Public Const MSG_UNEXPECTED_EOF = 39
Public Const MSG_SEL_SPAN_HDRFTR = 40
Public Const MSG_SECT_TBL_MISSING = 41
Public Const MSG_ERR_FONT_CREATE = 42
Public Const MSG_ERR_FONT_SELECT = 43
Public Const MSG_ERR_INIT_BMP = 44
Public Const MSG_ERR_INIT_OLE = 45
Public Const MSG_ERR_INIT_PRINTER = 46
Public Const MSG_ERR_INSTANCE = 47
Public Const MSG_ERR_LOAD_ACCEL = 48
Public Const MSG_ERR_MAIL_MERGE = 49
Public Const MSG_ERR_MEM_LOCK = 50
Public Const MSG_ERR_META_ACCESS = 51
Public Const MSG_ERR_META_BAD_FILE = 52
Public Const MSG_ERR_META_COPY = 53
Public Const MSG_ERR_META_CREATE = 54
Public Const MSG_ERR_META_READ = 55
Public Const MSG_ERR_META_RECREATE = 56
Public Const MSG_ERR_OBJ_DATA = 57
Public Const MSG_ERR_OBJ_SAVE = 58
Public Const MSG_ERR_OBJ_SIZE = 59
Public Const MSG_ERR_OLE_CLSID = 60
Public Const MSG_ERR_OLE_DATA_CONV = 61
Public Const MSG_ERR_OLE_LOAD = 62
Public Const MSG_ERR_OLE_SAVE = 63
Public Const MSG_ERR_OLE_USER = 64
Public Const MSG_ERR_OLE_VERSION = 65
Public Const MSG_ERR_PEN = 66
Public Const MSG_ERR_PICT_FILE_FMT = 67
Public Const MSG_ERR_PICT_FILE_OPEN = 68
Public Const MSG_ERR_PICT_FILE_READ = 69
Public Const MSG_ERR_PRESENT_DATA = 70
Public Const MSG_ERR_SITE_CREATE = 71
Public Const MSG_ERR_START_PRINTER = 72
Public Const MSG_ERR_STORAGE_CREATE = 73
Public Const MSG_ERR_STORAGE_RETRIEVE = 74
Public Const MSG_ERR_TEXT_METRIC = 75
Public Const MSG_ERR_VIEW_RETRIEVE = 76
Public Const MSG_FILE_INFO_MISSING = 77
Public Const MSG_FILE_SIGN_MISSING = 78
Public Const MSG_FONT_TBL_INCOMPL = 79
Public Const MSG_INVALID_NUMBER = 80
Public Const MSG_INVALID_PRINT_RECT = 81
Public Const MSG_INVALID_SECT_DATA = 82
Public Const MSG_INVALID_SELECT = 83
Public Const MSG_KEEP_HDRFTR_LINE = 84
Public Const MSG_LINE_TOO_LONG = 85
Public Const MSG_LINE_TRUNCATED = 86
Public Const MSG_MARGIN_TOO_LARGE = 87
Public Const MSG_MAX_LINES_EXCEEDED = 88
Public Const MSG_MERGE_DATA_TOO_LONG = 89
Public Const MSG_MISSING_ROW_MARKER = 90
Public Const MSG_NODEL_HDRFTR_BODY = 91
Public Const MSG_NOT_TE_FILE = 92
Public Const MSG_NO_HILIGHT = 93
Public Const MSG_NO_OLE_CLASS = 94
Public Const MSG_NO_RANGE_PRINTING = 95
Public Const MSG_NO_SERVER = 96
Public Const MSG_NO_STRING = 97
Public Const MSG_NULL_FIELD = 98
Public Const MSG_OLEERR_NEED_SHARE = 99
Public Const MSG_OLEERR_NO_CLASS = 100
Public Const MSG_OUT_OF_CELL_SLOT = 101
Public Const MSG_OUT_OF_CHAR_STACK = 102
Public Const MSG_OUT_OF_COMP_DC = 103
Public Const MSG_OUT_OF_DC = 104
Public Const MSG_OUT_OF_DRAG_OBJ = 105
Public Const MSG_OUT_OF_FONT_SLOT = 106
Public Const MSG_OUT_OF_GROUP = 107
Public Const MSG_OUT_OF_MEM = 108
Public Const MSG_OUT_OF_PARA_SLOT = 109
Public Const MSG_OUT_OF_PARAFID_SLOT = 110
Public Const MSG_OUT_OF_RANGE = 111
Public Const MSG_OUT_OF_ROW_SLOT = 112
Public Const MSG_OUT_OF_STYLESHEET = 113
Public Const MSG_OUT_OF_TAB_POS = 114
Public Const MSG_OUT_OF_TAB_TABLE = 115
Public Const MSG_OUT_OF_TASK = 116
Public Const MSG_OUT_OF_WIN_SLOTS = 117
Public Const MSG_PARASTYLE_IN_USE = 118
Public Const MSG_PARA_FMT_MISSING = 119
Public Const MSG_PARA_TBL_INCOMPL = 120
Public Const MSG_PFRAME_DATA_MISSING = 121
Public Const MSG_PRINT_AREA_SMALL = 122
Public Const MSG_PROTECTED = 123
Public Const MSG_READ_ABORTED = 124
Public Const MSG_REPLACE_STRING = 125
Public Const MSG_SAVE_INCOMPL = 126
Public Const MSG_SAVE_MODS = 127
Public Const MSG_SECTION_FULL = 128
Public Const MSG_BAD_WIN_HANDLE = 129
Public Const MSG_BAD_VERSION = 130
Public Const MSG_NODEL_MIX_HTML = 131
Public Const MSG_ERR_TOO_MANY_FILES = 132
Public Const MSG_ERR_FILE_ACCESS = 133
Public Const MSG_REDO_EMPTY = 134
Public Const MSG_OUT_OF_BLT_TABLE = 135
Public Const MSG_BULLET_MISSING = 136
Public Const MSG_BAD_JPG_FILE = 137
Public Const MSG_ERR_JPG_HUFF = 138
Public Const MSG_ERR_JPG_MARKER = 139
Public Const MSG_ERR_JPG_NO_HUFF = 140
Public Const MSG_TAG_TABLE_MISSING = 141
Public Const MSG_ERR_ENH_META_HDR = 142
Public Const MSG_GET_ENH_META = 143
Public Const MSG_MAX_WIN_LINES = 144
Public Const MSG_SOFT_PAGE_BREAK = 145
Public Const MSG_SECT_BREAK = 146
Public Const MSG_PAGE_BREAK = 147
Public Const MSG_COL_BREAK = 148
Public Const MSG_PAGE_HDR = 149
Public Const MSG_PAGE_FTR = 150
Public Const MSG_ROW_BREAK = 151
Public Const MSG_DEL_DRAW_OBJ = 152
Public Const MSG_DEL_FRAME = 153
Public Const MSG_IRREVERSIBLE_DEL = 154
Public Const MSG_ERR_PRINT = 155
Public Const MSG_FIRST_HDR = 156
Public Const MSG_FIRST_FTR = 157
Public Const MSG_DEL_FIRST_HDR = 158
Public Const MSG_DEL_FIRST_FTR = 159
Public Const MSG_BAD_PNG_DATA = 160
Public Const MSG_PRINTING_CANCELLED = 161
Public Const MSG_SMALL_CELL_MARGIN = 162
Public Const MSG_READ_ONLY = 163
Public Const MSG_NO_PRINTER = 164
Public Const MSG_DEL_TOC = 165
Public Const MSG_NO_RTF_INFO_BLOCK = 166
Public Const MSG_NO_LIST_BLOCK = 167
Public Const MSG_NO_LIST_OR_BLOCK = 168
Public Const MSG_DEL_HDR = 169
Public Const MSG_DEL_FTR = 170
Public Const MSG_ERR_JPG_MCU = 171
Public Const MSG_OUT_OF_IMAGE_MAP_TABLE = 172
Public Const MSG_COLUMNS = 173
Public Const MSG_GIF_FILES = 174
Public Const MSG_ENH_METAFILES = 175
Public Const MSG_BMP_FILES = 176
Public Const MSG_METAFILES = 177
Public Const MSG_JPG_FILES = 178
Public Const MSG_PNG_FILES = 179
Public Const MSG_PICTURE_SIZE = 180
Public Const MSG_SINGLE = 181
Public Const MSG_15LINES = 182
Public Const MSG_DBL_LINE = 183
Public Const MSG_EXACTLY = 184
Public Const MSG_MULTIPLE = 185
Public Const MSG_LINES = 186
Public Const MSG_POINTS = 187
Public Const MSG_TAB_POS = 188
Public Const MSG_MARGIN = 189
Public Const MSG_PNG_ABORT = 190
Public Const MSG_FATAL_ERROR = 191
Public Const MSG_FILE_OPEN = 192
Public Const MSG_ERROR = 193
Public Const MSG_SPL_DONE = 194
Public Const MSG_BAD_RTF = 195
Public Const MSG_UNKNOWN = 196
Public Const MSG_ATLEAST = 197
Public Const MSG_PAGE_BOX = 198
Public Const MSG_IGNORE_ALL = 199
Public Const MSG_ADD = 200
Public Const MSG_SB_INS = 201
Public Const MSG_SB_OT = 202
Public Const MSG_SB_PAGE = 203
Public Const MSG_SB_LINE = 204
Public Const MSG_SB_ROW = 205
Public Const MSG_SB_COL = 206
Public Const MSG_PP_ONE_PAGE = 207
Public Const MSG_PP_TWO_PAGES = 208
Public Const MSG_PP_PRINT = 209
Public Const MSG_PP_EDIT = 210
Public Const MSG_PP_PG = 211
Public Const MSG_PP_FITTED = 212
Public Const MSG_TIFF = 213
Public Const MSG_TIF_FILES = 214
Public Const MSG_INVOKE_TEXT_LINK = 215
Public Const MSG_NO_REVIEWER_BLOCK = 216
Public Const MSG_INSERTED_BY = 217
Public Const MSG_DELETED_BY = 218
Public Const MSG_NO_CHANGED_TEXT = 219
Public Const MSG_ACCEPT_CHANGES = 220
Public Const MSG_CHANGES_COUNT = 221
Public Const MSG_REJECT_CHANGES = 229
Public Const MSG_REJECT_COUNT = 230
Public Const MSG_DATA_TOO_BIG = 231
Public Const MSG_PAGE_LHDR = 232
Public Const MSG_PAGE_LFTR = 233
Public Const MSG_PAGE_RHDR = 234
Public Const MSG_PAGE_RFTR = 235
Public Const MSG_XML_READER = 236
Public Const MSG_OLD_XML_LIB = 237
Public Const MSG_HTML_ADD_ON = 238
Public Const MSG_FMT_BY = 239
Public Const MSG_PDF = 240
Public Const MSG_PARA_FMT_BY = 241
Public Const MSG_LOAD_LIBRARY = 242


Public Type StrTerRect                           ' rectangle type used by StrTerField type
   left As Long
   top As Long
   right As Long
   bottom As Long
End Type


Rem *****************************************************************************
Rem  Argument Structure:'   A set of control variables are passed by the user program to the 'ter' routine.
Rem  The variables are passed using the type 'arg_list',  as described
Rem  below.
Rem ******************************************************************************
Public Type arg_list
    x       As Long      ' Initial x position of the editing window,
                            ' you may specify CW_USEDEFAULT to use default values.
    y       As Long      ' Initial y position of the editing window.
    Width   As Long      ' Initial width of the window in device units,
                            ' you may specify CW_USEDEFAULT to use default values.
    height  As Long      ' Initial height of the editing window.  When you
                            ' use CW_USEDEFAULT for te_width, te_height is
                            ' ignored.
    LineLimit As Long       ' maximum number of lines. Set to 0 to allows unlimited number of lines
                            ' in the editor.

    WordWrap As Long     ' Set this flag to true (1),  if you wish to enable the
                            ' word wrapping feature.
    PrintView As Long    ' Set to TRUE to show the document as they will
                            ' appear on the printer
    PageMode  As Long    ' Set to TRUE to edit one page at a time.
    FittedView As Long   ' Set this flag to enable special PageMode where the
                            ' text wraps within the window width
    ShowStatus As Long   ' show status line ?
    ShowMenu As Long     ' show the menu bar ?
    ShowHorBar As Long   ' show the horizonatal scroll bar
    ShowVerBar As Long   ' show the vertical scroll bar
    ruler      As Long   ' TRUE to show the ruler
    ToolBar    As Long   ' TRUE to show the tool bar
    UserCanClose As Long ' TRUE allows the user to close the window
    BorderMargins As Long ' TRUE to create border margins around the text
    ReadOnly As Long     ' TRUE to create read only session

    InitLine As Long        ' Line number to position at the beginning.
    InputType As String * 1 ' This flag specifies the input type. If you wish to
                            ' edit a file, set the input_type to 'F'. Conversely,
                            ' if you wish to pass the text for editing in a buffer,
                            ' set this field to 'B'.

    file As String * 299    ' 20091022: increased from 131 to 299; If the input type is set to 'F',  specify the file
                            ' name for editing in this field.
                            ' You must append chr(0) to
                            ' NULL terminate this string

                     ' ===== Buffer input fields only =======
    hBuffer As Long      ' Specify the global memory handle containing the
                            ' input text data.  This handle becomes the property
                            ' of the editor.  Your program must never try to lock
                            ' or free this handle.
                            ' Your VB application can use the StrToHandle
                            ' function to convert the string data into
                            ' global memory handle

    BufferLen As Long       ' Buffer length in number of characters.
    delim As String * 1     ' Line delimiter character.  This character must be
                            ' used to delimit individual lines within the
                            ' text buffer.  This character is typically set to
                            ' 13 (carriage return)

    padding1 As String * 3  ' This field not used

    SaveFormat As Long   ' Output format (SAVE_DEFAULT,SAVE_TER,SAVE_TEXT,SAVE_RTF)

    hInst As Long        ' Set this field to 0
    hParentWnd As Long   ' Handle to the parent window
    hTextWnd As Long      ' Ter main window handle, will be filled by TER
    style As Long           '  Editor window style
    FontTypeface As String * 28 ' Default type face, example: TmwRmn
                            ' Courier, etc.  You must append
                            ' chr(0) to NULL terminate this
                            ' string
    PointSize As Long    ' point size of the default font face

    open As Long         ' Set this field to False
    modified As Long     ' For internal use
End Type


Rem *****************************************************************************
Rem  Field Data Structure:
Rem  This structure is used to retrieve (GetTerFields()) and set (SetTerFields())
Rem  control fields for a TER window.
Rem ******************************************************************************
Public Type StrTerField
   ' The following fields are read/write fields.  To update a field,
   '   you must retrieve the current values by calling the GetTerFields function.
   '   Modify the fields that you wish to, and then call the SetTerFields
   '   function to make the new value effective
   '*************************************************************************
      size As Long             ' size of the structure, used for version matching

      CurCol As Long           ' current window column position
      PaintEnabled As Long     ' FALSE=disables the painting and word wrapping
      WrapFlag As Long         ' wrap control, see WRAP_ constants

      CurRow As Long              ' current window row position
      BeginLine As Long           ' line number of the first window line
      CurLine As Long             ' current line number in the file

      TextBkColor As Long        ' background color for text
      StatusBkColor As Long      ' background color of the status line
      StatusColor As Long        ' foreground color of the status line

      HilightType As Long     ' line or character block, see HILIGHT_ constants
      HilightBegCol As Long   ' beginning col
      HilightEndCol As Long   ' ending col

      HilightBegRow As Long      ' beginning row
      HilightEndRow As Long      ' ending row

      StretchHilight As Long  ' TRUE = highlight being stretch


      ' please do not use following two fields as they are being phased out.
      ' To get the text and font information, use the TerGetLine function instead.
      text As String * 1000       ' line text data, NULL terminated
      font As String * 1000       ' font id for every character in the 'text' array

      pfmt As Long            ' paragraph id of the current line

      LineLen As Long         ' length of the 'text' array

      TextApply As Long       ' use this variable to specify how the text
                                 ' and font data should be applied to the
                                 ' current TER window, see APPLY_ constants

      ReclaimResources As Long ' reuse unused font and para ids

      ModifyProtectColor As Long ' modify the color or the protected text
      LinkDblClick As Long       ' TRUE to activate hyperlink on double click, otherwise use single click
      ShowProtectCaret As Long   ' TRUE to show caret on the protected text

      LinkStyle As Long          ' character style of the hyperlink phrase
      LinkColor As Long             ' color of the linked phrase

      SnapToGrid As Long          ' TRUE to snap ruler items to an invisible grid
      HtmlMode   As Long          ' TRUE to enable html adjustments
      ShowTableGridLines As Long  ' TRUE to show table grid lines

   '*************************************************************************
   ' The following are the read only fields.  TER will ignore any
   ' modification to these fields.
   '*************************************************************************
      hTextWnd As Long        ' handle to the editor window
      hTerDC As Long          ' handle to TER class DC
      TerRect As StrTerRect      ' entire client window rectangal
      TerWinRect As StrTerRect   ' text window rectangal

      TotalLines As Long         ' total lines in the file
      MouseLine As Long          ' text line position of mouse
      MaxColBlock As Long        ' biggest column block allowed

      TotalPfmts As Long      ' total paragraph ids in use by the current window
      TotalFonts As Long      ' Total font objects in use by the current window
      TotalStyles As Long     ' Total number of styles

      WinWidth As Long        ' current window in columns
      WinHeight As Long       ' current window height in number of rows
      TerWinOrgX As Long      ' window origin x co-ordinates

      MouseCol As Long        ' text column position of mouse

      modified As Long        ' data modified, user needs to select the 'save' option to save data
      WordWrap As Long        ' TRUE when word wrap turned on

      ParaLeftIndent As Long  ' paragraph left indent in twips
      ParaRightIndent As Long ' paragraph right indent in twips
      ParaFirstIndent As Long ' paragraph first line indent in twips
      ParaFlags As Long       ' paragraph flags,includes such flags as double spacing,centering, right justify etc
      ParaTabId As Long       ' paragraph tab id, index into the tab table
      ParaCellId As Long      ' paragraph cell id that the paragraph belongs to
      ParaShading As Long     ' paragraph shading (0 to 10000)
      ParaFrameId As Long     ' paragraph frame id
      ParaSpaceBefore As Long ' paragraph space before the paragraph in twips
      ParaSpaceAfter As Long  ' paragraph space after the paragraph in twips
      ParaSpaceBetween As Long ' paragraph space between the paragraph in twips
      ParaStyleId As Long     ' paragraph style id
      ParaAuxId As Long       ' paragraph aux id
      pflags As Long          ' PFLAG_ paragraph flags

      CurSect As Long         ' current section number

      LeftMargin As Long      ' section left margin in twips
      RightMargin As Long     ' section right margin in twips
      TopMargin As Long       ' section top margin in twips
      BotMargin As Long       ' section bottom margin in twips
      columns As Long         ' number of columns in the current section

      CurPage As Long         ' current page number
      TotalPages As Long      ' number of pages in the document

      MouseX As Long          ' last mouse x position
      MouseY As Long          ' last mouse y position

      PrintViewW As Long      ' TRUE when the print view mode is turned on
      PageModeW  As Long      ' TRUE when the page mode is turned on
      FittedViewW As Long     ' TRUE when the fitted view is turned on
      ShowParaMarkW As Long   ' TRUE when showing the paramarkers
      ShowHiddenTextW As Long ' TRUE when showing the hidden text

      CurCtlIdW As Long       ' currently selected control id
      ParaFrameFlagsW As Long ' Para frame flags (PARA_FRAME_?)

End Type

Rem *****************************************************************************
Rem  Print parameter structure.  This structure is used to print a buffer
Rem  or a file without invoking the editor windows.
Rem ******************************************************************************
Public Type StrPrint
    InputType As String * 1 ' This flag specifies the input type. If you wish to
                            ' specify a disk a file, set the input_type to 'F'. Conversely,
                            ' if you wish to pass the text in a buffer,
                            ' set this field to 'B'.

    file As String * 299    ' If the input type is set to 'F',  specify the file
                            ' name for editing in this field.
                            ' You must append chr(0) to
                            ' NULL terminate this string

                     ' ===== Buffer input fields only =======
    hBuffer As Long      ' Specify the global memory handle containing the
                            ' input text data.

    BufferLen As Long       ' Buffer length in number of characters.
    delim As String * 1     ' Line delimiter character.  This character must be
                            ' used to delimit individual lines within the
                            ' text buffer.  You have an option of using a
                            ' NULL, a carriage return or any other character of
                            ' your choice.
    padding1 As String * 3  ' This field not used


    hPrtDC As Long       ' Printer device context. If NULL, the default
                            ' printer device is opened.  The device context
                            ' must be set to the pixel mappding mode.
    rect As Long            ' Not used by VB application
    StartPos As Long        ' Starting character position.  Set to 0 to begin from
                            ' the first page.
    OnePage  As Long     ' Set to TRUE to stop after printing one page.  The
                            ' printed page is NOT spooled to the printer.
    NextPos  As Long        ' (OUTPUT) When OnePage is TRUE, the TerMergePrint
                            ' function returns the character where the next
                            ' page  should begin.  The value is set to 0 after
                            ' the entire buffer is printed.

                            ' Mail merge fields
    MergeFields As Long     ' Not used by VB application
    MergeData As Long       ' Not used by VB application

                            ' Other Fields
    PrintHiddenText As Long ' TRUE to print any hidden text
    hInst As Long        ' Set this field to 0
    hParentWnd As Long   ' Handle to the parent window

    NextY As Long        ' (OUTPUT) The DLL returns the Next Y on the paper

    hMetaDC As Long      ' Metafile device context to print to.  Set to NULL
                            ' print to the hDC specified above or to the default
                            ' printer.  When hMetaDC is not NULL, the hDC is
                            ' used as an attribute device context.
End Type

Rem *****************************************************************************
Rem  Tab creation structure.  This structure is used to create a tab id.
Rem  or a file without invoking the editor windows.
Rem ******************************************************************************
Public Type StrTab
    count As Long         ' number of tabs
    pos(20) As Long       ' tab position in twips
    TabType(20) As Long   ' tab type each stop, TAB_LEFT, TAB_RIGHT
    Flags(20) As Byte        ' Other TAB_ constantsEnd Type                      // pointer to the tab table
End Type

Rem *****************************************************************************
Rem              TER Messages
Rem ******************************************************************************

Rem ******************************************************************************
Rem   TER_CLOSE:
Rem   Ter sends this message to the parent window (your application window)
Rem   before closing.  The wParam variables contains the handle of the TER
Rem   window.  lParam is not used.

Rem   If your application is using a GlobalBuffer, you can retrieve the updated
Rem   buffer when receiving this message. Use the GetTerBuffer() function to
Rem   retrived the global handle to updated text data.
Rem ******************************************************************************
Public Const TER_CLOSE = &HAA4

Rem ******************************************************************************
Rem TER_MODIFIED:
Rem  Ter sends this message to the parent window once when the editor text is
Rem  modified. The wParam variable contains the handle of the TER window.
Rem ******************************************************************************
Public Const TER_MODIFIED = &HAA5


Rem *****************************************************************************
Rem                    Editor Function Prototype
Rem ******************************************************************************

Public Declare Function CreateTerWindow Lib "ter32.dll" (arg As arg_list) As Long
Public Declare Function CloseTer Lib "ter32.dll" (ByVal hWnd As Long, ByVal force As Long) As Long
Public Declare Function GetTerBuffer Lib "ter32.dll" (ByVal hWnd As Long, BufLen As Long) As Long
Public Declare Function GetTerFields Lib "ter32.dll" (ByVal hWnd As Long, fields As StrTerField) As Long
Public Declare Function GetTerFieldsAlt Lib "ter32.dll" (ByVal hWnd As Long, fields As StrTerField, ByVal LineNo As Long) As Long
Public Declare Function GetTerCursorPos Lib "ter32.dll" (ByVal hWnd As Long, LineNo As Long, ColNo As Long) As Long
Public Declare Function HandleToStr Lib "ter32.dll" (ByVal OutString As String, ByVal StrLen As Long, ByVal GlobalHandle As Long) As Long
Public Declare Function InsertRtfBuf Lib "ter32.dll" (ByVal hWnd As Long, ByVal OutString As String, ByVal StringLen As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal repaint As Long) As Long
Public Declare Function InsertTerText Lib "ter32.dll" (ByVal hWnd As Long, ByVal InText As String, ByVal repaint As Long) As Long
Public Declare Function ParaIndentTwips Lib "ter32.dll" (ByVal hWnd As Long, ByVal DeltaLeft As Long, ByVal DeltaRight As Long, ByVal DeltaFirst As Long, ByVal repaint As Long) As Long
Public Declare Function ParaLeftIndent Lib "ter32.dll" (ByVal hWnd As Long, ByVal IndentFlag As Long, ByVal repaint As Long) As Long
Public Declare Function ParaRightIndent Lib "ter32.dll" (ByVal hWnd As Long, ByVal IndentFlag As Long, ByVal repaint As Long) As Long
Public Declare Function ParaHangingIndent Lib "ter32.dll" (ByVal hWnd As Long, ByVal IndentFlag As Long, ByVal repaint As Long) As Long
Public Declare Function ParaNormal Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function SaveTerFile Lib "ter32.dll" (ByVal hWnd As Long, ByVal OutFileName As String) As Long
Public Declare Function SelectTerText Lib "ter32.dll" (ByVal hWnd As Long, ByVal BegLine As Long, ByVal BegCol As Long, ByVal EndLine As Long, ByVal EndCol As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerCursorPos Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerFields Lib "ter32.dll" (ByVal hWnd As Long, fields As StrTerField) As Long
Public Declare Function SetTerParaFmt Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParaStyles As Long, ByVal OnOff As Long, ByVal repaint As Long) As Long
Public Declare Function SetTab Lib "ter32.dll" (ByVal hWnd As Long, ByVal TabType As Long, ByVal TabPos As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerBuffer Lib "ter32.dll" (ByVal hWnd As Long, ByVal hBuf As Long, ByVal BufLen As Long, ByVal title As String, ByVal release As Long) As Long
Public Declare Function SetTerFont Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontTypeface As String, ByVal repaint As Long) As Long
Public Declare Function SetTerDefaultFont Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontTypeface As String, ByVal PointSize As Long, ByVal CharStyles As Long, ByVal TextColor As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerPointSize Lib "ter32.dll" (ByVal hWnd As Long, ByVal PointSize As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerCharStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal CharStyles As Long, ByVal OnOff As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal color As Long, ByVal repaint As Long) As Long
Public Declare Function SetTerBkColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal BkColor As Long, ByVal repaint As Long) As Long
Public Declare Function StrToHandle Lib "ter32.dll" (ByVal InString As String, ByVal StrLen As Long) As Long
Public Declare Function ClearTab Lib "ter32.dll" (ByVal hWnd As Long, ByVal TabPos As Long, ByVal repaint As Long) As Long
Public Declare Function ClearAllTabs Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function GetTerLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal LineText As Any, ByVal LineFont As Any) As Long
Public Declare Function SetTerLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal LineText As Any, ByVal LineFont As Any) As Long
Public Declare Function GetFontInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal FontTypeface As String, FontPointSize As Long, FontStyles As Long) As Long
Public Declare Function TerAppendText Lib "ter32.dll" (ByVal hWnd As Long, ByVal TextLine As String, ByVal FontId As Long, ByVal Paraid As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertText Lib "ter32.dll" (ByVal hWnd As Long, ByVal TextLine As String, ByVal FontId As Long, ByVal Paraid As Long, ByVal repaint As Long) As Long
Public Declare Function TerCreateFont Lib "ter32.dll" (ByVal hWnd As Long, ByVal ReuseId As Long, ByVal SharedId As Long, ByVal typeface As String, ByVal PtSize As Long, ByVal sty As Long, ByVal clr As Long, ByVal BkClr As Long, ByVal fld As Long, ByVal AuxId As Long) As Long
Public Declare Function TerCreateParaId Lib "ter32.dll" (ByVal hWnd As Long, ByVal ReuseId As Long, ByVal SharedId As Long, ByVal leftIndent As Long, ByVal RightIndent As Long, ByVal FirstIndent As Long, ByVal tabid As Long, ByVal StyleId As Long, ByVal AuxId As Long, ByVal shade As Long, ByVal pflags As Long, ByVal SpcBefore As Long, ByVal SpcAfter As Long, ByVal SpcBetween As Long, ByVal Flags As Long) As Long
Public Declare Function TerCreateTable Lib "ter32.dll" (ByVal hWnd As Long, ByVal TableRow As Long, ByVal TableCol As Long, ByVal repaint As Long) As Long
Public Declare Function TerDataVersion Lib "ter32.dll" () As Long
Public Declare Function TerGetHypertext Lib "ter32.dll" (ByVal hWnd As Long, ByVal HyperText As String, ByVal HyperCode As String) As Long
Public Declare Function TerGetTextColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, TextColor As Long, TextBkColor As Long) As Long
Public Declare Function TerInsertControl Lib "ter32.dll" (ByVal hWnd As Long, ByVal CtlClass As String, ByVal CtlStyles As Long, ByVal CtlWidth As Long, ByVal CtlHeight As Long, ByVal align As Long, ByVal CtlId As Long, ByVal insert As Long) As Long
Public Declare Function TerInsertParaFrame Lib "ter32.dll" (ByVal hWnd As Long, ByVal x As Long, ByVal y As Long, ByVal FrameWidth As Long, ByVal FrameHeight As Long, ByVal boxed As Long) As Long
Public Declare Function TerInsertDrawObject Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjType As Long, ByVal x As Long, ByVal y As Long, ByVal FrameWidth As Long, ByVal FrameHeight As Long) As Long
Public Declare Function TerMoveParaFrame Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParaFID As Long, ByVal x As Long, ByVal y As Long, ByVal FrameWidth As Long, ByVal FrameHeight As Long) As Long
Public Declare Function TerPageBreak Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSectBreak Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerColBreak Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerPastePicture Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictFormat As Long, ByVal hData As Long, ByVal FrameId As Long, ByVal align As Long, ByVal insert As Long) As Long
Public Declare Function TerInsertObjectId Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertFootnote Lib "ter32.dll" (ByVal hWnd As Long, ByVal FootnoteMarker As String, ByVal FootnoteText As String, ByVal FootnoteStyle As Long, ByVal repaint As Long) As Long
Public Declare Function TerPictureFromFile Lib "ter32.dll" (ByVal hWnd As Long, ByVal BitmapFileName As Any, ByVal align As Long, ByVal insert As Long) As Long
Public Declare Function TerPictureFromWmf Lib "ter32.dll" (ByVal hWnd As Long, ByVal WmfName As Any, ByVal align As Long, ByVal insert As Long) As Long
Public Declare Function TerPrint Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long) As Long
Public Declare Function TerMergePrintVB Lib "ter32.dll" (prt As StrPrint, ByRef PrintRect As Any, ByVal MergeFields As Any, ByVal MergeData As Any) As Long
Public Declare Function TerPrintPreview Lib "ter32.dll" (ByVal hWnd As Long, ByVal hPreviewDC As Long, ByRef PreviewRect As StrTerRect, ByVal PageNo As Long, ByVal ScalePage As Long) As Long
Public Declare Function TerPrintPreviewMode Lib "ter32.dll" (ByVal hWnd As Long, ByVal ShowToolbar As Long) As Long
Public Declare Function TerSetPrintPreview Lib "ter32.dll" (ByVal hWnd As Long, ByVal PreviewBegins As Long) As Long
Public Declare Function TerMergeFields Lib "ter32.dll" (ByVal hWnd As Long, ByVal FieldNames As String, ByVal FieldData As String, ByVal repaint As Long) As Long
Public Declare Function TerLocateStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal styles As Long, StartLine As Long, StartCol As Long, StringLen As Long) As Long
Public Declare Function TerLocateStyleChar Lib "ter32.dll" (ByVal hWnd As Long, ByVal styles As Long, ByVal present As Long, StartLine As Long, StartCol As Long, ByVal forward As Long) As Long
Public Declare Function TerSetMargin Lib "ter32.dll" (ByVal hWnd As Long, ByVal LeftMargin As Long, ByVal RightMargin As Long, ByVal TopMargin As Long, ByVal BotMargin As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetDefTabWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewWidth As Long, ByVal repaint As Long) As Long
Public Declare Function TerEnableRefresh Lib "ter32.dll" (ByVal hWnd As Long, ByVal EnableRefresh As Long) As Long
Public Declare Function TerEnableSpeedKey Lib "ter32.dll" (ByVal hWnd As Long, ByVal CommandId As Long, ByVal EnableSpeedKey As Long) As Long
Public Declare Function TerMenuEnable Lib "ter32.dll" (ByVal hWnd As Long, ByVal EnableFlag As Long) As Long
Public Declare Function TerMenuSelect Lib "ter32.dll" (ByVal hWnd As Long, ByVal SelectFlag As Long) As Long
Public Declare Function TerPosHdrFtr Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal header As Long, ByVal pos As Long, ByVal repaint As Long) As Long
Public Declare Function TerPosTable Lib "ter32.dll" (ByVal hWnd As Long, ByVal TableNo As Long, ByVal RowNo As Long, ByVal ColNo As Long, ByVal pos As Long, ByVal repaint As Long) As Long
Public Declare Function TerScrLineHeight Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long) As Long
Public Declare Function TerSearchReplace Lib "ter32.dll" (ByVal hWnd As Long, ByVal SearchText As String, ByVal ReplaceText As String, ByVal Flags As Long, ByVal StartPos As Long, EndPos As Long, BufSize As Long) As Long
Public Declare Function TerSetModify Lib "ter32.dll" (ByVal hWnd As Long, ByVal modify As Long) As Long
Public Declare Function TerSetParaShading Lib "ter32.dll" (ByVal hWnd As Long, ByVal shading As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetParaSpacing Lib "ter32.dll" (ByVal hWnd As Long, ByVal SpaceBefore As Long, ByVal SpaceAfter As Long, ByVal SpaceBetween As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetFontId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerSetPrinter Lib "ter32.dll" (ByVal hWnd As Long, ByVal PrinterName As String, ByVal DriverNamer As String, ByVal PortName As String, ByVal hGlobal As Long) As Long
Public Declare Function TerSetPaper Lib "ter32.dll" (ByVal hWnd As Long, ByVal PaperSize As Long, ByVal PaperOrient As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetReadOnly Lib "ter32.dll" (ByVal hWnd As Long, ByVal ReadOnly As Long) As Long
Public Declare Function TerSetOutputFormat Lib "ter32.dll" (ByVal hWnd As Long, ByVal OutputFormat As Long) As Long
Public Declare Function ReadTerFile Lib "ter32.dll" (ByVal hWnd As Long, ByVal InFileName As String) As Long
Public Declare Function TerRowColToAbs Lib "ter32.dll" (ByVal hWnd As Long, ByVal TextLine As Long, ByVal TextCol As Long) As Long
Public Declare Function TerAbsToRowCol Lib "ter32.dll" (ByVal hWnd As Long, ByVal AbsPos As Long, TextLine As Long, TextCol As Long) As Long
Public Declare Function TerGetPictInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal pict As Long, style As Long, rect As StrTerRect, align As Long, AuxId As Long) As Long
Public Declare Function TerSetPictInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal pict As Long, ByVal style As Long, ByVal align As Long, ByVal AuxId As Long) As Long
Public Declare Function TerSetPictSize Lib "ter32.dll" (ByVal hWnd As Long, ByVal pict As Long, ByVal PictWidth As Long, ByVal PictHeight As Long) As Long
Public Declare Function TerSetPreview Lib "ter32.dll" (ByVal hWnd As Long, ByVal NumPages As Long, ByVal ZoomPct As Long, ByVal ShowToolbar As Long) As Long
Public Declare Function TerSetSect Lib "ter32.dll" (ByVal hWnd As Long, ByVal NumCols As Long, ByVal ColSpace As Long, ByVal StartPage As Long) As Long
Public Declare Function TerRepaint Lib "ter32.dll" (ByVal hWnd As Long, ByVal ClearBackground As Long) As Long
Public Declare Function TerRewrap Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function DeselectTerText Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetCurFont Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long) As Long
Public Declare Function TerGetEffectiveFont Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerSetBullet Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetBullet As Long, ByVal repaint As Long) As Long
Public Declare Function TerEditStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal start As Long, ByVal StyleName As String, ByVal NewStyle As Long, ByVal StyleType As Long, ByVal repaint As Long) As Long
Public Declare Function TerSelectCharStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleId As Long, ByVal repaint As Long) As Long
Public Declare Function TerSelectParaStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleId As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetFontStyleId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerSetZoom Lib "ter32.dll" (ByVal hWnd As Long, ByVal ZoomPercent As Long) As Long
Public Declare Function TerGetPageFirstLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNum As Long) As Long
Public Declare Function TerSetTab Lib "ter32.dll" (ByVal hWnd As Long, ByVal TabType As Long, ByVal TabPos As Long, ByVal TabLeader As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetPageSect Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long) As Long
Public Declare Function TerSetSectOrient Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageOrient As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetPageOrient Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long) As Long
Public Declare Function TerRowPosition Lib "ter32.dll" (ByVal hWnd As Long, ByVal JustFlag As Long, ByVal AllRows As Long, ByVal repaint As Long) As Long
Public Declare Function TerRowHeight Lib "ter32.dll" (ByVal hWnd As Long, ByVal MinHeight As Long, ByVal AllRows As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetFrameYBase Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrameId As Long, ByVal FrameBase As Long) As Long
Public Declare Function TerSetObjectAttrib Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal LineType As Long, ByVal LineThickness As Long, ByVal LineColor As Long, ByVal FillSolid As Long, ByVal FillColor As Long) As Long
Public Declare Function TerSetBkPictId Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal PictFlag As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertPictureFile Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictFileName As Any, ByVal embed As Long, ByVal align As Long, ByVal insert As Long) As Long
Public Declare Function TerSetTableColWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal ColumnWidth As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertTableCol Lib "ter32.dll" (ByVal hWnd As Long, ByVal insert As Long, ByVal AllRows As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertTableRow Lib "ter32.dll" (ByVal hWnd As Long, ByVal insert As Long, ByVal repaint As Long) As Long
Public Declare Function TerCellBorder Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal TopWidth As Long, ByVal BotWidth As Long, ByVal LeftWidth As Long, ByVal RightWidth As Long, ByVal repaint As Long) As Long
Public Declare Function TerCellShading Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal ShadingPct As Long, ByVal repaint As Long) As Long
Public Declare Function TerPosLineAtTop Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal WinTop As Long) As Long
Public Declare Function TerSetFlags Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerGetFrameSize Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrameId As Long, FrameX As Long, FrameY As Long, FrameWidth As Long, FrameHeight As Long) As Long
Public Declare Function TerGetTabStop Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal TabNo As Long, TabPos As Long, TabType As Long, TabFlags As Long) As Long
Public Declare Function TerAppendTextEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal TextLine As String, ByVal FontId As Long, ByVal Paraid As Long, ByVal CellId As Long, ByVal ParaFID As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetRtfSel Lib "ter32.dll" (ByVal hWnd As Long, BufLen As Long) As Long
Public Declare Function TerGetParaInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, leftIndent As Long, RightIndent As Long, FirstIndent As Long, tabid As Long, StyleId As Long, AuxId As Long, shade As Long, pflags As Long, SpcBefore As Long, SpcAfter As Long, SpcBetween As Long, Flags As Long) As Long
Public Declare Function TerGetLineInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, Paraid As Long, CellId As Long, ParaFID As Long, LineX As Long, LineY As Long, LineHeight As Long, lflags As Long, InfoFlags As Long) As Long
Public Declare Function TerGetLastMessage Lib "ter32.dll" (ByVal TerMessage As String, ByVal DebugMessage As String) As Long
Public Declare Function TerResetLastMessage Lib "ter32.dll" () As Long
Public Declare Function TerPictLinkName Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal GetName As Long, ByVal FileName As String) As Long
Public Declare Function TerGetCellInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long, TableRow As Long, PrevCell As Long, NextCell As Long, CellWidth As Long, CellBorder As Long, cellshading As Long, RowSpan As Long, ColSpan As Long, CellFlags As Long) As Long
Public Declare Function TerGetControlId Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long) As Long
Public Declare Function TerRepaginate Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetReadOnly Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerSetParaAuxId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FirstLine As Long, ByVal LastLine As Long, ByVal AuxId As Long) As Long
Public Declare Function TerSavePict Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal FileName As String) As Long
Public Declare Function TerSetParaId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FirstLine As Long, ByVal LastLine As Long, ByVal Paraid As Long) As Long
Public Declare Function TerCreateCellId Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewRow As Long, ByVal PrevCell As Long, ByVal RowAlign As Long, ByVal RowPos As Long, ByVal RowMinHeight As Long, ByVal CellWidth As Long, ByVal shading As Long, ByVal LeftWidth As Long, ByVal RightWidth As Long, ByVal TopWidth As Long, ByVal BotWidth As Long, ByVal RowSpan As Long, ByVal ColSpan As Long, ByVal CellFlags As Long) As Long
Public Declare Function TerSetCharAuxId Lib "ter32.dll" (ByVal hWnd As Long, ByVal AuxId As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal TextLine As String, ByVal FontId As Long, ByVal Paraid As Long, ByVal CellId As Long, ByVal ParaFID As Long, ByVal repaint As Long) As Long
Public Declare Function TerDeleteCells Lib "ter32.dll" (ByVal hWnd As Long, ByVal SelectType As Long, ByVal repaint As Long) As Long
Public Declare Function TerShrinkFontTable Lib "ter32.dll" () As Long
Public Declare Function TerSetPaperEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal PaperSize As Long, ByVal PaperWidth As Long, ByVal PaperHeight As Long, ByVal PaperOrient As Long, ByVal repaint As Long) As Long
Public Declare Function TerDeleteBlock Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal LineText As Any, LineFont As Any) As Long
Public Declare Function TerSetLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal LineText As Any, LineFont As Any) As Long
Public Declare Function TerGetTextSel Lib "ter32.dll" (ByVal hWnd As Long, BufLen As Long) As Long
Public Declare Function TerTextPosToPix Lib "ter32.dll" (ByVal hWnd As Long, ByVal RelativeTo As Long, ByVal LineNo As Long, ByVal ColNo As Long, XPos As Long, YPos As Long) As Long
Public Declare Function TerFileToMem Lib "ter32.dll" (ByVal FileName As String, FileSize As Long) As Long
Public Declare Function TerSelectPrint Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerPosFrame Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrameNo As Long, ByVal pos As Long, ByVal repaint As Long) As Long
Public Declare Function TerPosBodyText Lib "ter32.dll" (ByVal hWnd As Long, ByVal SectNo As Long, ByVal pos As Long, ByVal repaint As Long) As Long
Public Declare Function TerPixToTextPos Lib "ter32.dll" (ByVal hWnd As Long, ByVal RelativeTo As Long, ByVal XPos As Long, ByVal YPos As Long, LineNo As Long, ColNo As Long) As Long
Public Declare Function TerSetNextFontAux1Id Lib "ter32.dll" (ByVal hWnd As Long, ByVal Aux1Id As Long) As Long
Public Declare Function TerGetFontAux1Id Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerSetPflags Lib "ter32.dll" (ByVal hWnd As Long, ByVal pflags As Long, ByVal OnOff As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetCharSet Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewCharSet As Long) As Long
Public Declare Function TerCommand Lib "ter32.dll" (ByVal hWnd As Long, ByVal CmdId As Long) As Long
Public Declare Function TerSetDefPrinter Lib "ter32.dll" (ByVal PrtName As String, ByVal PrtDriver As String, ByVal PrtPort As String) As Long
Public Declare Function TerInsertRtfFile Lib "ter32.dll" (ByVal hWnd As Long, ByVal FileName As String, ByVal LineNo As Long, ByVal ColNo As Long, ByVal repaint As Long) As Long
Public Declare Function TerNormalizeBlock Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerSetSearchString Lib "ter32.dll" (ByVal hWnd As Long, ByVal SearchStr As String, ByVal CaseSensitive As Long) As Long
Public Declare Function TerPosPage Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewPage As Long) As Long
Public Declare Function TerGetPagePos Lib "ter32.dll" (ByVal hWnd As Long, PageNo As Long, PagePos As Long) As Long
Public Declare Function TerSetPagePos Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long, ByVal PagePos As Long) As Long
Public Declare Function TerSetSectEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal NumCols As Long, ByVal ColSpace As Long, ByVal StartPage As Long, ByVal FirstPageNo As Long) As Long
Public Declare Function HandleToStrInChunks Lib "ter32.dll" (ByVal OutString As String, ByVal BufLen As Long, ByVal GlobalHandle As Long, ByVal ChunkPos As Long, ByVal ChunkLen As Long) As Long
Public Declare Function StrToHandleInChunks Lib "ter32.dll" (ByVal InString As String, ByVal BufLen As Long, ByVal GlobalHandle As Long, ByVal ChunkPos As Long, ByVal ChunkLen As Long) As Long
Public Declare Function TerGetHypertextEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal HyperText As String, ByVal HyperCode As String, ByVal SelectText As Long) As Long
Public Declare Function TerGetPageOrientEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long, PageWidth As Long, PageHeight As Long) As Long
Public Declare Function TerHtmlCellWidthFlag Lib "ter32.dll" (ByVal hWnd As Long, ByVal selection As Long, ByVal WidthFlag As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetNewFrameDim Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrmX As Long, ByVal FrmY As Long, ByVal FrmWidth As Long, ByVal FrmHeight As Long, ByVal PageTop As Long) As Long
Public Declare Function TerSetBorderColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal BorderColor As Long) As Long
Public Declare Function TerCellColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal CellColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertPictureFileXY Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictFileName As Any, ByVal embed As Long, ByVal align As Long, ByVal insert As Long, ByVal PosX As Long, ByVal PosY As Long) As Long
Public Declare Function TerSetBulletEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetReset As Long, ByVal SetBullet As Long, ByVal StartNbr As Long, ByVal NbrLevel As Long, ByVal BltNbrType As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetBulletInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal IdType As Long, ByVal ParamId As Long, IsBullet As Long, StartNbr As Long, NbrLevel As Long, BltSymbol As Long, BltFlags As Long) As Long
Public Declare Function TerCreateBulletId Lib "ter32.dll" (ByVal hWnd As Long, ByVal IsBullet As Long, ByVal StartNbr As Long, ByVal NbrLevel As Long, ByVal BltNbrType As Long) As Long
Public Declare Function TerSetBulletId Lib "ter32.dll" (ByVal hWnd As Long, ByVal BltId As Long, ByVal Paraid As Long) As Long
Public Declare Function TerPictureFromJpg Lib "ter32.dll" (ByVal hWnd As Long, ByVal WmfName As Any, ByVal align As Long, ByVal insert As Long) As Long
Public Declare Function TerSetDefTextColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal ForeColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetWrapWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal WidthChars As Long, ByVal WidthTwips As Long, ByVal repaint As Long) As Long
Public Declare Function TerOverrideStyles Lib "ter32.dll" (ByVal TerStyles As Long) As Long
Public Declare Function TerCreateWindowAlt Lib "ter32.dll" (ByVal xs As Long, ByVal y As Long, ByVal Width As Long, ByVal height As Long, ByVal IsChild As Long, ByVal hParentWnd As Long, ByVal style As Long) As Long
Public Declare Function TerInsertLineObject Lib "ter32.dll" (ByVal hWnd As Long, ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As Long
Public Declare Function TerCreateParaIdEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal ReuseId As Long, ByVal SharedId As Long, ByVal leftIndent As Long, ByVal RightIndent As Long, ByVal FirstIndent As Long, ByVal tabid As Long, ByVal StyleId As Long, ByVal AuxId As Long, ByVal shade As Long, ByVal pflags As Long, ByVal SpcBefore As Long, ByVal SpcAfter As Long, ByVal SpcBetween As Long, ByVal Flags As Long, ByVal BltId As Long, ByVal BkColor As Long) As Long
Public Declare Function TerSetParaBkColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal ShowDialog As Long, ByVal BkColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerIgnoreCommand Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerFlushUndo Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerSetWinBorder Lib "ter32.dll" (ByVal hWnd As Long, ByVal border As Long) As Long
Public Declare Function TerLineSelected Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long) As Long
Public Declare Function TerCellVertAlign Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal AlignFlag As Long, ByVal repaint As Long) As Long
Public Declare Function TerSelectCol Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerDeleteHypertext Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetCellBorderWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long, LeftWidth As Long, RightWidth As Long, TopWidth As Long, BotWidth As Long) As Long
Public Declare Function TerSetAccelHandle Lib "ter32.dll" (ByVal hWnd As Long, ByVal hNewAcc As Long) As Long
Public Declare Function TerGetSectInfo Lib "ter32.dll" (ByVal hWnd As Long, NumCols As Long, ColSpace As Long, StartPage As Long, FirstPageNo As Long) As Long
Public Declare Function TerCreateTabId Lib "ter32.dll" (ByVal hWnd As Long, TabInfo As StrTab) As Long
Public Declare Function TerSetFlags2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerCreateParaFrameId Lib "ter32.dll" (ByVal hWnd As Long, ByVal x As Long, ByVal y As Long, ByVal FrameWidth As Long, ByVal FrameHeight As Long) As Long
Public Declare Function TerSetTag Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal TagName As String, ByVal AuxText As String, ByVal AuxInt As Long, ByVal Flags As Long) As Long
Public Declare Function TerPosTag Lib "ter32.dll" (ByVal hWnd As Long, ByVal TagId As Long, ByVal TagName As String, ByVal SearchScope As Long, ByVal repaint As Long) As Long
Public Declare Function TerPrintEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal FirstPage As Long, ByVal LastPage As Long) As Long
Public Declare Function TerGetDrawObjectInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrameId As Long, Width As Long, height As Long, LineWidth As Long, LineColor As Long, FillColor As Long, Flags As Long) As Long
Public Declare Function TerGetDispPageNo Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long) As Long
Public Declare Function TerIsPrinting Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerInsertOleObject Lib "ter32.dll" (ByVal hWnd As Long, ByVal ProgName As String) As Long
Public Declare Function TerAdjustHtmlTable Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerXlateControlId Lib "ter32.dll" (ByVal hWnd As Long, ByVal CtlId As Long) As Long
Public Declare Function TerGetBufferDC Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerGetCaretPos Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerGetHypertext2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal HyperText As String, ByVal HyperCode As String, ByVal SelectText As Long) As Long
Public Declare Function TerSetMarginEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal LeftMarg As Long, ByVal RightMarg As Long, ByVal TopMarg As Long, ByVal BotMarg As Long, ByVal HeaderY As Long, ByVal FooterY As Long, ByVal repaint As Long) As Long
Public Declare Function TerRowPositionEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal JustFlag As Long, ByVal indent As Long, ByVal AllRows As Long, ByVal repaint As Long) As Long
Public Declare Function TerMovePictFrame Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal x As Long, ByVal y As Long) As Long
Public Declare Function TerGetMarginEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, LeftMarg As Long, RightMarg As Long, TopMarg As Long, BotMarg As Long, HeaderY As Long, FooterY As Long) As Long
Public Declare Function TerGetTag Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal TagName As String, ByVal AuxText As String, AuxInt As Long, Flags As Long) As Long
Public Declare Function TerGetNextTagId Lib "ter32.dll" (ByVal hWnd As Long, ByVal TagId As Long) As Long
Public Declare Function TerSetObjectAttribEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal LineType As Long, ByVal LineThickness As Long, ByVal LineColor As Long, ByVal FillSolid As Long, ByVal FillColor As Long, ByVal ZOrder As Long) As Long
Public Declare Function TerGetSeqSect Lib "ter32.dll" (ByVal hWnd As Long, ByVal SectId As Long) As Long
Public Declare Function TerSplitMbcs Lib "ter32.dll" (ByVal text As String, ByVal tail As String, ByVal lead As String) As Long
Public Declare Function TerMakeMbcs Lib "ter32.dll" (ByVal text As String, ByVal tail As String, ByVal lead As String, ByVal count As Long) As Long
Public Declare Function TerGetLineEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal LineText As Any, ByVal LineLead As Any, LineFont As Any) As Long
Public Declare Function TerSetLineEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal LineText As Any, ByVal LineLead As Any, LineFont As Any) As Long
Public Declare Function TerRegisterPrintCallback Lib "ter32.dll" (ByVal proc As Long) As Long
Public Declare Function TerMbcsLen Lib "ter32.dll" (ByVal text As String) As Long
Public Declare Function TerMbcsChar Lib "ter32.dll" (ByVal text As String, ByVal pos As Long) As Long
Public Declare Function TerInsertBookmark Lib "ter32.dll" (ByVal hWnd As Long, ByVal line As Long, ByVal col As Long, ByVal Name As String) As Long
Public Declare Function TerDeleteBookmark Lib "ter32.dll" (ByVal hWnd As Long, ByVal Name As String) As Long
Public Declare Function TerPosBookmark Lib "ter32.dll" (ByVal hWnd As Long, ByVal Name As String, ByVal repaint As Long) As Long
Public Declare Function TerGetBookmark Lib "ter32.dll" (ByVal hWnd As Long, ByVal BnkNo As Long, ByVal Name As String) As Long
Public Declare Function TerCreateFirstHdrFtr Lib "ter32.dll" (ByVal hWnd As Long, ByVal HdrFtr As Long) As Long
Public Declare Function TerDeleteFirstHdrFtr Lib "ter32.dll" (ByVal hWnd As Long, ByVal HdrFtr As Long, ByVal msg As Long) As Long
Public Declare Function TerPosHdrFtrEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal HdrFtr As Long, ByVal pos As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetRtfDocInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal InfoType As Long, ByVal InfoString As String) As Long
Public Declare Function TerSetRtfDocInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal InfoType As Long, ByVal InfoString As String) As Long
Public Declare Function TerPictureFromEmf Lib "ter32.dll" (ByVal hWnd As Long, ByVal WmfName As Any, ByVal align As Long, ByVal insert As Long) As Long
Public Declare Function TerInsertField Lib "ter32.dll" (ByVal hWnd As Long, ByVal FldName As String, ByVal FldData As Any, ByVal repaint As Long) As Long
Public Declare Function TerGetField Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal FldType As Long, ByVal FldText As Any) As Long
Public Declare Function TerLocateField Lib "ter32.dll" (ByVal hWnd As Long, ByVal loc As Long, ByVal FldName As String, ByVal exact As Long, ByVal repaint As Long) As Long
Public Declare Function TerPrint2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal FirstPage As Long, ByVal LastPage As Long, ByVal copies As Long, ByVal colate As Long) As Long
Public Declare Function TerChangeField Lib "ter32.dll" (ByVal hWnd As Long, ByVal FldName As String, ByVal FldData As String, ByVal repaint As Long) As Long
Public Declare Function TerChangeFieldU Lib "ter32.dll" (ByVal hWnd As Long, FldName As Integer, FldData As Integer, ByVal repaint As Long) As Long
Public Declare Function TerDeleteField Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetTextCase Lib "ter32.dll" (ByVal hWnd As Long, ByVal CaseType As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetCharSpace Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal adj As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetFontSpace Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal adj As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetFontSpace Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerScrToTwipsX Lib "ter32.dll" (ByVal hWnd As Long, ByVal ScrUnit As Long, TwipsUnit As Long) As Long
Public Declare Function TerScrToTwipsY Lib "ter32.dll" (ByVal hWnd As Long, ByVal ScrUnit As Long, TwipsUnit As Long) As Long
Public Declare Function TerOverridePageSize Lib "ter32.dll" (ByVal PgWidth As Long, ByVal PgHeight As Long) As Long
Public Declare Function TerGetWordCount Lib "ter32.dll" (ByVal hWnd As Long, ByVal Flags As Long) As Long
Public Declare Function TerPageFromLine Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long) As Long
Public Declare Function TerSetFontStyleId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontNo As Long, ByVal CharStyId As Long, ByVal ParaStyId As Long) As Long
Public Declare Function TerClosePrinter Lib "ter32.dll" () As Long
Public Declare Function TerCreateFont2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal ReuseId As Long, ByVal SharedId As Long, ByVal typeface As String, ByVal PtSize As Long, ByVal sty As Long, ByVal clr As Long, ByVal BkClr As Long, ByVal fld As Long, ByVal AuxId As Long, ByVal CharStyId As Long, ByVal ParaStyId As Long, ByVal expand As Long) As Long
Public Declare Function TerSetHdrRow Lib "ter32.dll" (ByVal hWnd As Long, ByVal CurCell As Long, ByVal SetReset As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetInitTypeface Lib "ter32.dll" (ByVal InitTypeface As String) As Long
Public Declare Function TerDocName Lib "ter32.dll" (ByVal hWnd As Long, ByVal GetSet As Long, ByVal DocName As String) As Long
Public Declare Function TerSetRowKeep Lib "ter32.dll" (ByVal hWnd As Long, ByVal CurCell As Long, ByVal SetReset As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetFontFieldId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerSetSect2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal NumCols As Long, ByVal ColSpace As Long, ByVal StartPage As Long, ByVal FirstPageNo As Long, ByVal FirstBin As Long, ByVal NextBin As Long) As Long
Public Declare Function TerIsTableWider Lib "ter32.dll" (ByVal hWnd As Long, ByVal MaxWidth As Long) As Long
Public Declare Function TerShrinkTable Lib "ter32.dll" (ByVal hWnd As Long, ByVal MaxWidth As Long, ByVal MinCellWidth As Long) As Long
Public Declare Function TerSetDefCellMargin Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellMargin As Long) As Long
Public Declare Function TerGetCharDim Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal CharVal As Long, pWidth As Long, pHeight As Long, ByVal ForScreen As Long) As Long
Public Declare Function TerGetDeviceRes Lib "ter32.dll" (ByVal hWnd As Long, pResX As Long, pResY As Long, ByVal ForScreen As Long) As Long
Public Declare Function TerSetTextAreaSize Lib "ter32.dll" (ByVal hWnd As Long, AreaWidth As Long, AreaHeight As Long) As Long
Public Declare Function GetFontInfo2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal FontTypeface As String, FontTwipsSize As Long, FontStyles As Long) As Long
Public Declare Function TerSetFlags3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerGetTagEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal TagType As Long, ByVal TagName As String, ByVal AuxText As String, AuxInt As Long, Flags As Long) As Long
Public Declare Function TerPosTagEx Lib "ter32.dll" (ByVal hWnd As Long, ByVal TagType As Long, ByVal TagId As Long, ByVal TagName As String, ByVal SearchScope As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetTablePos Lib "ter32.dll" (ByVal hWnd As Long, TableNo As Long, RowNo As Long, ColNo As Long) As Long
Public Declare Function TerAnd Lib "ter32.dll" (ByVal val1 As Long, ByVal val2 As Long) As Long
Public Declare Function TerOr Lib "ter32.dll" (ByVal val1 As Long, ByVal val2 As Long) As Long
Public Declare Function TerCommand2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal CmdId As Long, ByVal send As Long) As Long
Public Declare Function TerIsModified Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerSpellCheck Lib "ter32.dll" (ByVal hWnd As Long, ByVal StopAfterFirst As Long, ByVal msg As Long) As Long
Public Declare Function TerGetPageBorderDim Lib "ter32.dll" (ByVal hWnd As Long, pWidth As Long, pHeight As Long) As Long
Public Declare Function TerInsertTextInputField Lib "ter32.dll" (ByVal hWnd As Long, ByVal FldName As String, ByVal FldData As String, ByVal MaxLen As Long, ByVal BoxBorder As Long, ByVal typeface As String, ByVal TwipsSize As Long, ByVal style As Long, ByVal TextColor As Long, ByVal insert As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertCheckBoxField Lib "ter32.dll" (ByVal hWnd As Long, ByVal FldName As String, ByVal TwipsSize As Long, ByVal CHECKED As Long, ByVal insert As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetParaInfo2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, leftIndent As Long, RightIndent As Long, FirstIndent As Long, tabid As Long, StyleId As Long, AuxId As Long, shade As Long, pflags As Long, SpcBefore As Long, SpcAfter As Long, SpcBetween As Long, Flags As Long, Aux1Id As Long, BkColor As Long) As Long
Public Declare Function TerDeleteStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleId As Long, ByVal StyleName As String) As Long
Public Declare Function TerSetDefDir Lib "ter32.dll" (ByVal hWnd As Long, ByVal DefDir As String, ByVal DefFileType As Long) As Long
Public Declare Function TerSetCharLang Lib "ter32.dll" (ByVal hWnd As Long, ByVal LangId As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetFontLang Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerSetDefLang Lib "ter32.dll" (ByVal hWnd As Long, ByVal LangId As Long) As Long
Public Declare Function TerSetFocus Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerGetStyleId Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleName As String) As Long
Public Declare Function TerLocateFontId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, LineNo As Long, col As Long) As Long
Public Declare Function TerCreateBulletId2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal IsBullet As Long, ByVal StartNbr As Long, ByVal NbrLevel As Long, ByVal BltNbrType As Long, ByVal TextBef As String, ByVal TextAft As String) As Long
Public Declare Function TerSetBullet2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetReset As Long, ByVal SetBullet As Long, ByVal StartNbr As Long, ByVal NbrLevel As Long, ByVal BltNbrType As Long, ByVal TextBef As String, ByVal TextAft As String, ByVal repaint As Long) As Long
Public Declare Function TerLocateInputField Lib "ter32.dll" (ByVal hWnd As Long, ByVal location As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetInputFieldInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal FldName As String, FldType As Long, HasBorder As Long) As Long
Public Declare Function TerGetCheckboxInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, CHECKED As Long) As Long
Public Declare Function TerGetTextFieldInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal TextData As String, MaxChars As Long, BoxWidth As Long, ByVal typeface As String, TwipsSize As Long, style As Long) As Long
Public Declare Function TerSetCheckboxInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal CHECKED As Long) As Long
Public Declare Function TerSetInputFieldInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal FldName As String, ByVal HasBorder As Long) As Long
Public Declare Function TerSetTextFieldInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ObjectId As Long, ByVal TextData As String, ByVal MaxChars As Long, ByVal BoxWidth As Long, ByVal typeface As String, ByVal TwipsSize As Long, ByVal style As Long) As Long
Public Declare Function TerGetSelection Lib "ter32.dll" (ByVal hWnd As Long, BegLine As Long, BegCol As Long, EndLine As Long, EndCol As Long) As Long
Public Declare Function TerInsertDateTime Lib "ter32.dll" (ByVal hWnd As Long, ByVal DateFmt As String, ByVal repaint As Long) As Long
Public Declare Function TerInsertToc Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetStyleInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleId As Long, ByVal StyleName As String, StyleType As Long) As Long
Public Declare Function TerSelectRow Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertOleFile Lib "ter32.dll" (ByVal hWnd As Long, ByVal FileName As String, ByVal embed As Long, ByVal icon As Long, ByVal LineNo As Long, ByVal col As Long) As Long
Public Declare Function TerGetVisibleCol Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long) As Long
Public Declare Function TerSetFlags4 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerGetPageOrient2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long, PageWidth As Long, PageHeight As Long, HiddenX As Long, HiddenY As Long) As Long
Public Declare Function TerDeleteHdrFtr Lib "ter32.dll" (ByVal hWnd As Long, ByVal HdrFtr As Long, ByVal msg As Long) As Long
Public Declare Function TerGetTableLevel Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long) As Long
Public Declare Function TerGetRowInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal RowId As Long, height As Long, MinHeight As Long, FixWidth As Long, PrevRow As Long, NextRow As Long, indent As Long, Flags As Long, border As Long, CurWidth As Long) As Long
Public Declare Function TerSetCaretPos Lib "ter32.dll" (ByVal hWnd As Long, ByVal pos As Long) As Long
Public Declare Function TerUpdateToolbar Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerPosAfterTable Lib "ter32.dll" (ByVal hWnd As Long, ByVal OuterMost As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetParaInfo3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal IsStyleItem As Long, leftIndent As Long, RightIndent As Long, FirstIndent As Long, tabid As Long, StyleId As Long, AuxId As Long, shade As Long, pflags As Long, SpcBefore As Long, SpcAfter As Long, SpcBetween As Long, Flags As Long, Aux1Id As Long, BkColor As Long) As Long
Public Declare Function TerSetParaSpacing2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SpaceBefore As Long, ByVal SpaceAfter As Long, ByVal SpaceBetween As Long, ByVal LineSpacing As Long, ByVal repaint As Long) As Long
Public Declare Function TerQueryExit Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerInsertFootnote2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal FootnoteMarker As String, ByVal FootnoteText As String, ByVal FootnoteStyle As Long, ByVal IsFootnote As Long, ByVal repaint As Long) As Long
Public Declare Function TerEditList Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewList As Long, ByVal ListId As Long, ByVal PropDialog As Long, ByVal ListName As String, ByVal nested As Long, ByVal Flags As Long) As Long
Public Declare Function TerEditListOr Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewListOr As Long, ByVal ListOrId As Long, ByVal PropDialog As Long, ByVal ListId As Long, ByVal override As Long, ByVal Flags As Long) As Long
Public Declare Function TerEditListLevel Lib "ter32.dll" (ByVal hWnd As Long, ByVal IsList As Long, ByVal id As Long, ByVal level As Long, ByVal StartAt As Long, ByVal NumType As Long, ByVal CharAft As Long, ByVal ListText As String, ByVal FontId As Long, ByVal Flags As Long) As Long
Public Declare Function TerSetParaList Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal Paraid As Long, ByVal CurListOr As Long, ByVal level As Long, ByVal repaint As Long) As Long
Public Declare Function TerCreateListBulletId Lib "ter32.dll" (ByVal hWnd As Long, ByVal CurListOr As Long, ByVal level As Long) As Long
Public Declare Function TerRegisterMsgCallback Lib "ter32.dll" (ByVal hWnd As Long, ByVal CallbackFct As Long) As Long
Public Declare Function TerSetStatusColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal StatusColor As Long, ByVal StatusBkColor As Long) As Long
Public Declare Function TerMenuEnable2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal EnableFlag As Long) As Long
Public Declare Function TerMenuSelect2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SelectFlag As Long) As Long
Public Declare Function TerSetCellInfo2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long, ByVal BackColor As Long, ByVal margin As Long, ByVal ParentCell As Long) As Long
Public Declare Function TerEditTooltip Lib "ter32.dll" (ByVal hWnd As Long, ByVal TlbId As Long, ByVal tooltip As String) As Long
Public Declare Function TerGetBulletInfo2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal IdType As Long, ByVal ParamId As Long, IsBullet As Long, StartNbr As Long, NbrLevel As Long, BltSymbol As Long, BltListOr As Long, BltFlags As Long) As Long
Public Declare Function TerSetParaIndent Lib "ter32.dll" (ByVal hWnd As Long, ByVal IndentLeft As Long, ByVal IndentRight As Long, ByVal IndentFirst As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetListInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ListId As Long, ByVal ListName As String, LevelCount As Long, Flags As Long) As Long
Public Declare Function TerGetListOrInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal ListOrId As Long, ListId As Long, LevelCount As Long, Flags As Long) As Long
Public Declare Function TerGetListLevelInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal IsList As Long, ByVal id As Long, ByVal level As Long, StartAt As Long, NumType As Long, CharAft As Long, ByVal ListText As String, FontId As Long, Flags As Long) As Long
Public Declare Function TerDeleteObject Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerGetListInfo2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal ListId As Long, ByVal ListName As String, LevelCount As Long, Flags As Long, RtfId As Long, TmplId As Long) As Long
Public Declare Function TerSpellCheckerPopped Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerEngageCaret Lib "ter32.dll" (ByVal hWnd As Long, ByVal AtCursorLoc As Long) As Long
Public Declare Function TerCellBorderColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal TopColor As Long, ByVal BotColor As Long, ByVal LeftColor As Long, ByVal RightColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetCellBorderColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long, LeftColor As Long, RightColor As Long, TopColor As Long, BotColor As Long) As Long
Public Declare Function TerGetParaInfo4 Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal IsStyleItem As Long, leftIndent As Long, RightIndent As Long, FirstIndent As Long, tabid As Long, StyleId As Long, AuxId As Long, shade As Long, pflags As Long, SpcBefore As Long, SpcAfter As Long, SpcBetween As Long, Flags As Long, Aux1Id As Long, BkColor As Long, LineSpacing As Long) As Long
Public Declare Function TerRecreateToolbar Lib "ter32.dll" (ByVal hWnd As Long, ByVal show As Long) As Long
Public Declare Function TerHideToolbarIcon Lib "ter32.dll" (ByVal id As Long, ByVal hide As Long) As Long
Public Declare Function TerGetPictOffset Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long) As Long
Public Declare Function TerSetPictOffset Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal offset As Long, ByVal repaint As Long) As Long
Public Declare Function TerUpdateHyperlinkText Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewText As String, ByVal repaint As Long) As Long
Public Declare Function TerUpdateHyperlinkCode Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewCode As String) As Long
Public Declare Function TerInsertHyperlink Lib "ter32.dll" (ByVal hWnd As Long, ByVal LinkText As String, ByVal LinkCode As String, ByVal PictId As Long, ByVal repaint As Long) As Long
Public Declare Function TerFindHlinkField Lib "ter32.dll" (ByVal hWnd As Long, ByVal CodeString1 As String, ByVal CodeString2 As String, pLine As Long, pCol As Long) As Long
Public Declare Function TerGetPageCount Lib "ter32.dll" (ByVal hWnd As Long, TotalPages As Long, CurPage As Long) As Long
Public Declare Function TerLocateFieldChar Lib "ter32.dll" (ByVal hWnd As Long, ByVal FieldId As Long, ByVal FieldCode As String, ByVal present As Long, StartLine As Long, StartCol As Long, ByVal forward As Long) As Long
Public Declare Function TerPosTable2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal TableNo As Long, ByVal RowNo As Long, ByVal ColNo As Long, ByVal pos As Long, ByVal ParentCell As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetTablePos2 Lib "ter32.dll" (ByVal hWnd As Long, TableNo As Long, RowNo As Long, ColNo As Long, ByVal ParentCell As Long) As Long
Public Declare Function TerSetSectBorder Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal BorderType As Long, ByVal BorderWidth As Long, ByVal BorderSpace As Long, ByVal BorderColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetSectPageSize Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal PageSize As Long, ByVal PageWidth As Long, ByVal PageHeight As Long, ByVal repaint As Long) As Long
Public Declare Function TerCellWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal Width As Long, ByVal margin As Long, ByVal repaint As Long) As Long
Public Declare Function TerPosTable3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal TableId As Long, ByVal RowNo As Long, ByVal ColNo As Long, ByVal pos As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetTableId Lib "ter32.dll" (ByVal hWnd As Long, ByVal row As Long) As Long
Public Declare Function TerSetTableId Lib "ter32.dll" (ByVal hWnd As Long, ByVal row As Long, ByVal id As Long) As Long
Public Declare Function TerCreateOcxObject2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal ProgId As String, ByVal CtlWidth As Long, ByVal CtlHeight As Long) As Long
Public Declare Function TerSetOcxIntProp Lib "ter32.dll" (ByVal hWnd As Long, ByVal obj As Long, ByVal PropName As String, ByVal value As Long) As Long
Public Declare Function TerSetOcxTextProp Lib "ter32.dll" (ByVal hWnd As Long, ByVal obj As Long, ByVal PropName As String, ByVal text As String) As Long
Public Declare Function TerRotateFrameText Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal LineNo As Long, ByVal direction As Long, ByVal repaint As Long) As Long
Public Declare Function TerSearchReplaceU Lib "ter32.dll" (ByVal hWnd As Long, SearchText As Integer, ReplaceText As Integer, ByVal Flags As Long, ByVal StartPos As Long, EndPos As Long, BufSize As Long) As Long
Public Declare Function TerSetPictFrame2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal pict As Long, ByVal FrameType As Long, ByVal x As Long, ByVal y As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamType As Long) As Long
Public Declare Function TerGetOlePtr Lib "ter32.dll" (ByVal hWnd As Long, ByVal obj As Long, ByVal InfoType As Long) As Long
Public Declare Function TerSetFrameMarginDist Lib "ter32.dll" (ByVal hWnd As Long, ByVal distance As Long) As Long
Public Declare Function TerSetUndoRef Lib "ter32.dll" (ByVal hWnd As Long, ByVal UndoRef As Long) As Long
Public Declare Function TerLparam2String Lib "ter32.dll" (ByVal LongPtr As Long, ByVal TextPtr As String) As Long
Public Declare Function TerString2Lparam Lib "ter32.dll" (ByVal TextPtr As String, ByVal LongPtr As Long) As Long
Public Declare Function TerGetTabStop2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal IdType As Long, ByVal LineNo As Long, ByVal TabNo As Long, TabPos As Long, TabType As Long, TabFlags As Long) As Long
Public Declare Function TerSearchReplace2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SearchText As String, ByVal ReplaceText As String, ByVal Flags As Long, ByVal StartPos As Long, ByVal EndPos As Long) As Long
Public Declare Function TerSetParaTextFlow Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal TextFlow As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetSectTextFlow Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal TextFlow As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetRowTextFlow Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal AllRows As Long, ByVal TextFlow As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetDocTextFlow Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal TextFlow As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetWaveUnderline Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal StartCol As Long, ByVal EndCol As Long, ByVal SetReset As Long, ByVal repaint As Long) As Long
Public Declare Function TerApplyHyperlink Lib "ter32.dll" (ByVal hWnd As Long, ByVal LinkCode As String, ByVal repaint As Long) As Long
Public Declare Function TerPdfStart Lib "ter32.dll" (ByVal OutFile As String, PdfId As Long, ByVal LicName As String, ByVal LicKey As String, ByVal LicNbr As Long, ByVal author As String, ByVal producer As String, ByVal title As String, ByVal subject As String, ByVal keywords As String, ByVal CreDate As String, ByVal ModDate As String) As Long
Public Declare Function TerPdfEnd Lib "ter32.dll" (ByVal hInstance As Long, ByVal PdfId As Long) As Long
Public Declare Function TerPdfPrintPage Lib "ter32.dll" (ByVal hWnd As Long, ByVal PdfId As Long, ByVal PageNo As Long) As Long
Public Declare Function TerCreateBulletId3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal IsBullet As Long, ByVal StartNbr As Long, ByVal NbrLevel As Long, ByVal BltNbrType As Long, ByVal TextBef As String, ByVal TextAft As String, ByVal Flags As Long) As Long
Public Declare Function TerSetBullet3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetReset As Long, ByVal SetBullet As Long, ByVal StartNbr As Long, ByVal NbrLevel As Long, ByVal BltNbrType As Long, ByVal TextBef As String, ByVal TextAft As String, ByVal Flags As Long, ByVal repaint As Long) As Long
Public Declare Function TerPictAltInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal GetAlt As Long, ByVal AltInfo As String) As Long
Public Declare Function TerSetPictCropping Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal CropLeft As Long, ByVal CropTop As Long, ByVal CropRight As Long, ByVal CropBot As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetPictCropping Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal CropType As Long) As Long
Public Declare Function TerSetMaxUndo Lib "ter32.dll" (ByVal hWnd As Long, ByVal MaxUndo As Long) As Long
Public Declare Function TerSelectCellText Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerPdfSetDllName Lib "ter32.dll" (ByVal DllName As String) As Long
Public Declare Function TerSetParamRect Lib "ter32.dll" (ByVal hWnd As Long, ByVal RectLeft As Long, ByVal RectRight As Long, ByVal RectTop As Long, ByVal RectBot As Long) As Long
Public Declare Function TerSetFlags5 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerGetCellInfo2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long, BackColor As Long, margin As Long) As Long
Public Declare Function TerPickBknd Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerIsTableSelected Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerCreateFont3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal ReuseId As Long, ByVal SharedId As Long, ByVal typeface As String, ByVal PtSize As Long, ByVal sty As Long, ByVal clr As Long, ByVal BkClr As Long, ByVal fld As Long, ByVal AuxId As Long, ByVal CharStyId As Long, ByVal ParaStyId As Long, ByVal expand As Long, ByVal CharSet As Long) As Long
Public Declare Function TerSetCtlColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal BkColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertTextU Lib "ter32.dll" (ByVal hWnd As Long, TextLine As Integer, ByVal FontId As Long, ByVal Paraid As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetFontParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal ParamType As Long) As Long
Public Declare Function TerPdfStart2 Lib "ter32.dll" (ByVal OutFile As String, PdfId As Long, ByVal LicName As String, ByVal LicKey As String, ByVal LicNbr As Long, ByVal author As String, ByVal producer As String, ByVal title As String, ByVal subject As String, ByVal keywords As String, ByVal CreDate As String, ByVal ModDate As String, ByVal EnhOptions As Long) As Long
Public Declare Function TerSelectTable Lib "ter32.dll" (ByVal hWnd As Long, ByVal level As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetSect3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal NumCols As Long, ByVal ColSpace As Long, ByVal StartPage As Long, ByVal FirstPageNo As Long, ByVal FirstBin As Long, ByVal NextBin As Long, ByVal SectId As Long) As Long
Public Declare Function TerGetOverrideBin Lib "ter32.dll" (ByVal hWnd As Long, StartCopy As Long, BinNo As Long) As Long
Public Declare Function TerSetOverrideBin Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal StartCopy As Long, ByVal BinNo As Long) As Long
Public Declare Function TerGetRowCellCount Lib "ter32.dll" (ByVal hWnd As Long, ByVal GetRowCount As Long) As Long
Public Declare Function TerGetTextSelU Lib "ter32.dll" (ByVal hWnd As Long, BufLen As Long) As Long
Public Declare Function TerGetPrinter Lib "ter32.dll" (ByVal hWnd As Long, ByVal PrtName As String, ByVal PrtDriver As String, ByVal PrtPort As String) As Long
Public Declare Function TerGetHdrFtrPos Lib "ter32.dll" (ByVal hWnd As Long, ByVal line As Long) As Long
Public Declare Function TerHdrFtrExists Lib "ter32.dll" (ByVal hWnd As Long, ByVal SectId As Long) As Long
Public Declare Function TerDeleteCellText Lib "ter32.dll" (ByVal hWnd As Long, ByVal SelectType As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetPageNumFmt Lib "ter32.dll" (ByVal hWnd As Long, ByVal SectId As Long, ByVal fmt As Long) As Long
Public Declare Function TerGetPageNumFmt Lib "ter32.dll" (ByVal hWnd As Long, ByVal SectId As Long) As Long
Public Declare Function TerSetUlineColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal UlineColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerAddToolbarIcon Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal id As Long, ByVal CmdId As Long, ByVal BmpFile As String, ByVal BalloonText As String) As Long
Public Declare Function TerSetListBullet Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetList As Long, ByVal NumType As Long, ByVal level As Long, ByVal start As Long, ByVal TextBef As String, ByVal TextAft As String, ByVal repaint As Long) As Long
Public Declare Function TerSetListLevel Lib "ter32.dll" (ByVal hWnd As Long, ByVal level As Long, ByVal increment As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetListBullet2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetList As Long, ByVal NumType As Long, ByVal level As Long, ByVal start As Long, ByVal TextBef As String, ByVal TextAft As String, ByVal ListText As String, ByVal repaint As Long) As Long
Public Declare Function TerGetBulletInfo3 Lib "ter32.dll" (ByVal hWnd As Long, ByVal IdType As Long, ByVal ParamId As Long, IsBullet As Long, StartNbr As Long, NbrLevel As Long, BltSymbol As Long, BltListOr As Long, BltFlags As Long, ByVal ListText As String) As Long
Public Declare Function TerGetTextHeight Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerGetSectBins Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, FirstPageBin As Long, NextPageBin As Long) As Long
Public Declare Function TerGetLineWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long) As Long
Public Declare Function TerGetParaParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal IsStyleItem As Long, ByVal InfoType As Long) As Long
Public Declare Function TerSetLinkPictDir Lib "ter32.dll" (ByVal hWnd As Long, ByVal DefDir As String) As Long
Public Declare Function TerSetDefTabType Lib "ter32.dll" (ByVal hWnd As Long, ByVal DefTab As Long) As Long
Public Declare Function TerSetFlags6 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerSetStyleParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal ParamType As Long, ByVal IntParam As Long, ByVal TextParam As String, ByVal repaint As Long) As Long
Public Declare Function TerCancelEditStyle Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerSetObjectWrapStyle Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrameId As Long, ByVal WrapStyle As Long) As Long
Public Declare Function TerGetStyleParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal ParamType As Long) As Long
Public Declare Function TerGetFrameParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal ParamType As Long) As Long
Public Declare Function TerSetWatermarkPict Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal wash As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertPageRef Lib "ter32.dll" (ByVal hWnd As Long, ByVal bookmark As String, ByVal IsHyperlink As Long, ByVal IsAlphabetic As Long, ByVal repaint As Long) As Long
Public Declare Function TerCellRotateText Lib "ter32.dll" (ByVal hWnd As Long, ByVal range As Long, ByVal direction As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetParaBorderColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal BorderColor As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetCustomMessage Lib "ter32.dll" (ByVal id As Long, ByVal message As String) As Long
Public Declare Function TerCellBorder2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal TopWidth As Long, ByVal BotWidth As Long, ByVal LeftWidth As Long, ByVal RightWidth As Long, ByVal outline As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetLinkDblClick Lib "ter32.dll" (ByVal id As Long, ByVal DblClick As Long) As Long
Public Declare Function TerGetCellParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamType As Long, ByVal id As Long, ParamValue As Long) As Long
Public Declare Function TerSetStCharSet Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewCharSet As Long) As Long
Public Declare Function TerGetLineU Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, LineText As Any, LineFont As Any) As Long
Public Declare Function TerPdcStart Lib "ter32.dll" (ByVal LicKey As String, ByVal OutFile As String, ByVal author As String, ByVal producer As String, ByVal title As String, ByVal subject As String, ByVal keywords As String, ByVal CreDate As String, ByVal ModDate As String, ByVal Flags As Long) As Long
Public Declare Function TerPdcEnd Lib "ter32.dll" (ByVal PdfId As Long) As Long
Public Declare Function TerPdcPrintPage Lib "ter32.dll" (ByVal hWnd As Long, ByVal PdfId As Long, ByVal PageNo As Long) As Long
Public Declare Function TerPdcStart2 Lib "ter32.dll" (ByVal LicKey As String, ByVal OutFile As String, ByVal author As String, ByVal producer As String, ByVal title As String, ByVal subject As String, ByVal keywords As String, ByVal CreDate As String, ByVal ModDate As String, ByVal Flags As Long, ByVal PermFlags As Long, ByVal OwnerPass As String, ByVal UserPass As String) As Long
Public Declare Function TerGetFontFieldCode Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal FieldCode As String) As Long
Public Declare Function TerSetFontField Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long, ByVal FieldId As Long, ByVal FieldCode As String) As Long
Public Declare Function TerSetFrameTextDist Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParaFID As Long, ByVal distance As Long) As Long
Public Declare Function TerSetPageBkColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageBkColor As Long) As Long
Public Declare Function TerSetLicenseKey Lib "ter32.dll" (ByVal key As String) As Long
Public Declare Function TerSetSectLineNbr Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal SetReset As Long, ByVal repaint As Long) As Long
Public Declare Function TerAddAutoCompWord Lib "ter32.dll" (ByVal hWnd As Long, ByVal ACWord As String, ByVal ACPhrase As String) As Long
Public Declare Function TerEnableTracking Lib "ter32.dll" (ByVal hWnd As Long, ByVal enable As Long, ByVal UserName As String, ByVal UseDefaultClrStyle As Long, ByVal InsStyle As Long, ByVal InsColor As Long, ByVal DelStyle As Long, ByVal DelColor As Long) As Long
Public Declare Function TerFindNextChange Lib "ter32.dll" (ByVal hWnd As Long, ByVal forward As Long, ByVal repaint As Long) As Long
Public Declare Function TerAcceptChanges Lib "ter32.dll" (ByVal hWnd As Long, ByVal all As Long, ByVal DisplayMsg As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetLineParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ParamType As Long) As Long
Public Declare Function TerGetSectParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal SectId As Long, ByVal ParamType As Long) As Long
Public Declare Function TerSetSectLineNbr2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal SetReset As Long, ByVal LineStep As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetMenuItemDesc Lib "ter32.dll" (ByVal hWnd As Long, ByVal cmd As Long, ByVal desc As String) As Long
Public Declare Function TerSetFlags7 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerEnableDashes Lib "ter32.dll" (ByVal hWnd As Long, ByVal DllName As String, ByVal lang As Long, ByVal level As Long, ByVal enable As Long) As Long
Public Declare Function TerSetToolbarComboWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal Width As Long, ByVal recreate As Long) As Long
Public Declare Function TerRejectChanges Lib "ter32.dll" (ByVal hWnd As Long, ByVal all As Long, ByVal DisplayMsg As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetCharScaleX Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal ScalePct As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetReviewerInfo Lib "ter32.dll" (ByVal hWnd As Long, ByVal RevId As Long, ByVal RevName As String) As Long
Public Declare Function TerInsertHyperlinkU Lib "ter32.dll" (ByVal hWnd As Long, ByVal LinkText As Integer, ByVal LinkCode As String, ByVal repaint As Long) As Long
Public Declare Function TerUpdateHyperlinkTextU Lib "ter32.dll" (ByVal hWnd As Long, ByVal NewText As Integer, ByVal repaint As Long) As Long
Public Declare Function TerGetInputFieldId Lib "ter32.dll" (ByVal hWnd As Long, ByVal FieldName As String) As Long
Public Declare Function TerGetHypertextU Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, HyperText As Integer, ByVal HyperCode As String, ByVal SelectText As Long) As Long
Public Declare Function TerSelectFrameText Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSelectParaText Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetEffectiveFont Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontId As Long) As Long
Public Declare Function TerSetCellParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long, ByVal ParamType As Long, ByVal ParamVal As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetWaveUnderline2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal UlineColor As Long, ByVal LineNo As Long, ByVal StartCol As Long, ByVal EndCol As Long, ByVal SetReset As Long, ByVal repaint As Long) As Long
Public Declare Function TerMarksCells Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellSelect As Long) As Long
Public Declare Function TerEnableScrollBar Lib "ter32.dll" (ByVal hWnd As Long, ByVal HScrollBar As Long, ByVal enable As Long) As Long
Public Declare Function TerGetRefParamStr Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamNum As Long, ByVal ParamVal As String) As Long
Public Declare Function TerSetSectParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal ParamType As Long, ByVal ParamVal As Long, ByVal repaint As Long) As Long
Public Declare Function TerReformatTable Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetFlags8 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerEditStyleU Lib "ter32.dll" (ByVal hWnd As Long, ByVal start As Long, StyleName As Integer, ByVal NewStyle As Long, ByVal StyleType As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetStyleParamU Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal ParamType As Long, ByVal IntParam As Long, TextParam As Integer, ByVal repaint As Long) As Long
Public Declare Function TerGetStyleInfoU Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleId As Long, StyleName As Any, StyleType As Long) As Long
Public Declare Function TerGetStyleIdU Lib "ter32.dll" (ByVal hWnd As Long, StyleName As Any) As Long
Public Declare Function TerDeleteStyleU Lib "ter32.dll" (ByVal hWnd As Long, ByVal StyleId As Long, StyleName As Integer) As Long
Public Declare Function TerSetBorderLineColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal BorderLineColor As Long) As Long
Public Declare Function TerDeleteReviewer Lib "ter32.dll" (ByVal hWnd As Long, ByVal RevId As Long) As Long
Public Declare Function TerSetFrameParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal FrameId As Long, ByVal ParamType As Long, ByVal ParamVal As Long) As Long
Public Declare Function TerGetTagPos Lib "ter32.dll" (ByVal hWnd As Long, ByVal TagId As Long, ByVal TagName As String, ByVal TagType As Long) As Long
Public Declare Function TerGetTagPos2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal TagId As Long, ByVal TagName As String, ByVal TagType As Long, LineNo As Long, ColNo As Long) As Long
Public Declare Function TerDeleteTag Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal ColNo As Long, ByVal TagType As Long, ByVal TagName As String) As Long
Public Declare Function TerInsertToc2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal TocType As Long, ByVal styles As String, ByVal MinLevel As Long, ByVal MaxLevel As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetMbcs Lib "ter32.dll" (ByVal hWnd As Long, ByVal EnableDisable As Long) As Long
Public Declare Function TerSetDefListFormat Lib "ter32.dll" (ByVal hWnd As Long, ByVal level As Long, ByVal NumType As Long, ByVal ListText As String) As Long
Public Declare Function TerInsertPictureFileXY2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictFileName As Any, ByVal embed As Long, ByVal align As Long, ByVal insert As Long, ByVal PageRelative As Long, ByVal PosX As Long, ByVal PosY As Long) As Long
Public Declare Function TerSetFlags9 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerSetUserFont Lib "ter32.dll" (ByVal hWnd As Long, ByVal typeface As String, ByVal TwipsSize As Long, ByVal StylesOn As Long, ByVal StylesOff As Long) As Long
Public Declare Function TerInsertLineU Lib "ter32.dll" (ByVal hWnd As Long, TextLine As Any, ByVal FontId As Long, ByVal Paraid As Long, ByVal CellId As Long, ByVal ParaFID As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetPlaceHolderPict Lib "ter32.dll" (ByVal hWnd As Long, ByVal path As String) As Long
Public Declare Function TerApplyComment Lib "ter32.dll" (ByVal hWnd As Long, ByVal ShowDialog As Long, ByVal AuthorName As String, ByVal AuthorInit As String, ByVal CommentText As String, ByVal repaint As Long) As Long
Public Declare Function TerEditComment Lib "ter32.dll" (ByVal hWnd As Long, ByVal ShowDialog As Long, ByVal id As Long, ByVal AuthorName As String, ByVal AuthorInit As String, ByVal CommentText As String, ByVal repaint As Long) As Long
Public Declare Function TerSetRowParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamType As Long, ByVal id As Long, ByVal ParamValue As Long) As Long
Public Declare Function TerChangeToolbarIcon Lib "ter32.dll" (ByVal hWnd As Long, ByVal id As Long, ByVal BmpFile As String) As Long
Public Declare Function TerSetHilightColor Lib "ter32.dll" (ByVal hWnd As Long, ByVal dialog As Long, ByVal UlineColor As Long, ByVal toggle As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetFlags10 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long
Public Declare Function TerSetFlags11 Lib "ter32.dll" (ByVal hWnd As Long, ByVal SetFlags As Long, ByVal FlagValues As Long) As Long


Rem Undocumented functions - do not use them without consultation with Sub Systems, Inc.
Public Declare Function TerLocateFontFlags Lib "ter32.dll" (ByVal hWnd As Long, ByVal Flags As Long, ByVal present As Long, StartLine As Long, StartCol As Long, ByVal forward As Long) As Long
Public Declare Function TerGetOrigPictSize Lib "ter32.dll" (ByVal hWnd As Long, ByVal pict As Long, PictWidth As Long, PictHeight As Long) As Long
Public Declare Function TerSetCellSpan Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long, ByVal RowSpan As Long, ByVal ColSpan As Long) As Long
Public Declare Function TerGetCurParaNum Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerGetParaCount Lib "ter32.dll" (ByVal hWnd As Long) As Long
Public Declare Function TerPosAtParaNum Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParaNo As Long, ByVal repaint As Long) As Long
Public Declare Function HandleToIntArray Lib "ter32.dll" (OutArray As Integer, ByVal BufLen As Long, ByVal GlobalHandle As Long) As Long
Public Declare Function TerBulletToText Lib "ter32.dll" (ByVal hWnd As Long, ByVal all As Long, ByVal repaint As Long) As Long
Public Declare Function TerFieldToText Lib "ter32.dll" (ByVal hWnd As Long, ByVal all As Long, ByVal repaint As Long) As Long
Public Declare Function TerTocToText Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerRedirectArrowKeys Lib "ter32.dll" (ByVal hWnd As Long, ByVal redirect As Long) As Long
Public Declare Function TerSavePictEmf Lib "ter32.dll" (ByVal hWnd As Long, ByVal PictId As Long, ByVal FileName As String) As Long
Public Declare Function TerSpellCheck2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal StopAfterFirst As Long, ByVal msg As Long, pCancelled As Long) As Long
Public Declare Function TerSetMergeDelim Lib "ter32.dll" (ByVal delim As String) As Long
Public Declare Function TerAppendTextU Lib "ter32.dll" (ByVal hWnd As Long, TextLine As Any, ByVal FontId As Long, ByVal Paraid As Long, ByVal CellId As Long, ByVal ParaFID As Long, ByVal repaint As Long) As Long
Public Declare Function TerLow16Bits Lib "ter32.dll" (ByVal val As Long) As Long
Public Declare Function TerHigh16Bits Lib "ter32.dll" (ByVal val As Long) As Long
Public Declare Function TerSetPageBorderWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal BorderWidth As Long, ByVal repaint As Long) As Long
Public Declare Function TerCreateLeftRightHdrFtr Lib "ter32.dll" (ByVal hWnd As Long, ByVal HdrFtr As Long) As Long
Public Declare Function TerGetPageParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal PageNo As Long, ByVal ParamType As Long) As Long
Public Declare Function TerSetCharFlow Lib "ter32.dll" (ByVal hWnd As Long, ByVal flow As Long, ByVal repaint As Long) As Long
Public Declare Function TerInsertUserField Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSaveUndo Lib "ter32.dll" (ByVal hWnd As Long, ByVal BegLine As Long, ByVal BegCol As Long, ByVal EndLine As Long, ByVal EndCol As Long, ByVal UndoType As Long) As Long
Public Declare Function TerRecreateColSpan Lib "ter32.dll" (ByVal hWnd As Long, ByVal CellId As Long) As Long
Public Declare Function TerGetRowParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamType As Long, ByVal id As Long, ParamValue As Long) As Long
Public Declare Function TerSetCharOffset Lib "ter32.dll" (ByVal hWnd As Long, ByVal offset As Long, ByVal repaint As Long) As Long
Public Declare Function TerUpdateDynField Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetCustomFontList Lib "ter32.dll" (ByVal hWnd As Long, ByVal FontList As String, ByVal repaint As Long) As Long
Public Declare Function TerSetDefaultCellBorderWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal BorderWidth As Long, ByVal BorderColor As Long) As Long
Public Declare Function TerDeleteMenuItem Lib "ter32.dll" (ByVal hWnd As Long, ByVal CmdId As Long) As Long
Public Declare Function TerSetTcField Lib "ter32.dll" (ByVal hWnd As Long, ByVal TocLevel As Long, ByVal repaint As Long) As Long
Public Declare Function TerChangeFieldRtf Lib "ter32.dll" (ByVal hWnd As Long, ByVal FldName As String, ByVal RtfData As String, ByVal RtfLen As Long, ByVal repaint As Long) As Long
Public Declare Function TerSpoolBegin Lib "ter32.dll" (ByVal JobName As String) As Long
Public Declare Function TerSpoolEnd Lib "ter32.dll" () As Long
Public Declare Function TerSetSectColWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal col As Long, ByVal ColWidth As Long, ByVal ColSpace As Long, ByVal repaint As Long) As Long
Public Declare Function TerGetSectColWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal sect As Long, ByVal col As Long, ByVal GetColWidth As Long) As Long
Public Declare Function TerSetStKey Lib "ter32.dll" (ByVal key As String) As Long
Public Declare Function TerSetHtmlAddOnKey Lib "ter32.dll" (ByVal key As String) As Long
Public Declare Function TerSetStDictPath Lib "ter32.dll" (ByVal key As String) As Long
Public Declare Function TerStResetUserDict Lib "ter32.dll" (ByVal NewUserDictPath As String) As Long
Public Declare Function TerShrinkTableToPageWidth Lib "ter32.dll" (ByVal hWnd As Long, ByVal all As Long, ByVal repaint As Long) As Long
Public Declare Function TerStopMessages Lib "ter32.dll" (ByVal hWnd As Long, ByVal StopMessages As Long) As Long
Public Declare Function TerSetTag2 Lib "ter32.dll" (ByVal hWnd As Long, ByVal LineNo As Long, ByVal TagType As Long, ByVal ColNo As Long, ByVal TagName As String, ByVal AuxText As String, ByVal AuxInt As Long, ByVal Flags As Long) As Long
Public Declare Function TerResetUserColors Lib "ter32.dll" (ByVal hWnd As Long, ByVal repaint As Long) As Long
Public Declare Function TerChangeFieldPicture Lib "ter32.dll" (ByVal hWnd As Long, ByVal FldName As String, ByVal PictPath As String, ByVal RtfLen As Long, ByVal repaint As Long) As Long
Public Declare Function TerSetParam Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamType As Long, ByVal ParamValue As Long) As Long
Public Declare Function TerSetParamStr Lib "ter32.dll" (ByVal hWnd As Long, ByVal ParamType As Long, ByVal ParamValue As String) As Long
Public Declare Function TerTest Lib "ter32.dll" (ByVal hWnd As Long, ByVal num1 As Long,ByVal num2 As Long,ByVal num3 As Long, ByVal str1 As String, ByVal str2 As String, ByVal str2 As String) As Long

Public Declare Function TvbSetEventResult Lib "toc30.ocx" (ByVal PictType As Long) As Long

Rem **************************************************
Rem When a string is passed for OUTPUT to the DLL
Rem ,the output string created by the DLL has an extra
Rem NULL character.  For such strings, you must call
Rem this routine to strip the null character from the
Rem given string
Rem **************************************************
Function DiscardNull(InText As String) As String
   Dim i As Long
   Dim StrLen As Long
   Dim CurChar As String

   StrLen = Len(InText)

   For i = 1 To StrLen
      CurChar = left(InText, i)
      CurChar = right(CurChar, 1)

      If Asc(CurChar) = 0 Then
         DiscardNull = left(InText, i - 1)
         Exit Function
      End If
   Next i

   DiscardNull = InText

End Function
