'dDoc Constants and API calls ' $use "ddoc32.lib" ' 'Errors returned by dpStartDoc CONST DDOC_NOHANDLES=-1 CONST DDOC_BADFILE=-2 CONST DDOC_FILEEXISTS=-3 ' 'Status codes returned by dpMailInit CONST DDOC_MAIL_SUCCESS=0 CONST DDOC_MAIL_FNF=1 CONST DDOC_MAIL_LNF=2 CONST DDOC_MAIL_NOH=3 CONST DDOC_MAIL_HEIGHT_INVALID=4 CONST DDOC_MAIL_WIDTH_INVALID=5 CONST DDOC_MAIL_LABHEIGHT_INVALID=6 CONST DDOC_MAIL_LABWIDTH_INVALID=7 CONST DDOC_MAIL_COL_INVALID=8 CONST DDOC_MAIL_ROW_INVALID=9 CONST DDOC_MAIL_LINES_INVALID=10 ' 'Unit of measure constants:passed to dpStartDoc CONST DDOC_INCH=0 CONST DDOC_CM=1 ' 'Paper/orientation/bin parameters of dpStartDoc and dpNewPage CONST DDOC_SYSTEM_DEFAULT=-1 CONST DDOC_SAME_AS_FIRST=-2 CONST DDOC_PAPER_CUSTOM=-3 'this only applies to paper size param ' 'Orientation constants for use with dpStartDoc CONST DDOC_PORTRAIT=0 CONST DDOC_LANDSCAPE=1 ' 'dpStartDoc option constants CONST DDOC_VIEWBUILD=1 CONST DDOC_ALLOWFAX =2 CONST DDOC_ALLOWMAPI=4 CONST DDOC_ALLOWSAVE=8 CONST DDOC_ZOOMWIDTH=64 CONST DDOC_ZOOMFIT=128 CONST DDOC_ZOOM75=256 CONST DDOC_ZOOM100=512 CONST DDOC_ZOOM125=1024 CONST DDOC_SCALETEXT=2048 CONST DDOC_FASTTEXT=0 CONST DDOC_SAVE_EXE_ONLY=4096 CONST DDOC_ALLOWSMTP=8192 ' 'Font style bit-wise constants for the dpFont call CONST DDOC_FONTNORMAL=0 CONST DDOC_FONTBOLD=1 CONST DDOC_FONTITALIC=2 CONST DDOC_FONTUNDERLINE=4 CONST DDOC_FONTSTRIKEOUT=8 CONST DDOC_FONTBASELINE=16 ' 'Paper bin constants used in dpStartDoc and dpNewPage CONST DDOC_BIN_UPPER=1 CONST DDOC_BIN_FIRST=DDOC_BIN_UPPER CONST DDOC_BIN_ONLYONE=1 CONST DDOC_BIN_LOWER=2 CONST DDOC_BIN_MIDDLE=3 CONST DDOC_BIN_MANUAL=4 CONST DDOC_BIN_ENVELOPE=5 CONST DDOC_BIN_ENVMANUAL=6 CONST DDOC_BIN_AUTO=7 CONST DDOC_BIN_TRACTOR=8 CONST DDOC_BIN_SMALLFMT=9 CONST DDOC_BIN_LARGEFMT=10 CONST DDOC_BIN_LARGECAPACITY=11 CONST DDOC_BIN_CASSETTE=14 CONST DDOC_BIN_LAST=DDOC_BIN_CASSETTE ' 'Paper size constants used in dpStartDoc and dpNewPage CONST DDOC_PAPER_LETTER=1 ' Letter 8 ½ x 11" CONST DDOC_PAPER_LETTERSMALL=2 ' Letter Small 8 ½ x 11" CONST DDOC_PAPER_TABLOID=3 ' Tabloid 11 x 17" CONST DDOC_PAPER_LEDGER=4 ' Ledger 17 x 11" CONST DDOC_PAPER_LEGAL=5 ' Legal 8 ½ x 14" CONST DDOC_PAPER_STATEMENT=6 ' Statement 5 ½ x 8 ½" CONST DDOC_PAPER_EXECUTIVE=7 ' Executive"7 ½ x 10" CONST DDOC_PAPER_A3=8 ' A3 297 x 420 mm CONST DDOC_PAPER_A4=9 ' A4 210 x 297 mm CONST DDOC_PAPER_A4SMALL=10 ' A4 Small 210 x 297 mm CONST DDOC_PAPER_A5=11 ' A5 148 x 210 mm CONST DDOC_PAPER_B4=12 ' B4 250 x 354 CONST DDOC_PAPER_B5=13 ' B5 182 x 257 mm CONST DDOC_PAPER_FOLIO=14 ' Folio 8 ½ x 13" CONST DDOC_PAPER_QUARTO=15 ' Quarto 215 x 275 mm CONST DDOC_PAPER_10x14=16 ' 10x14" CONST DDOC_PAPER_11X17=17 ' 11x17" CONST DDOC_PAPER_NOTE=18 ' Note 8 ½ x 11" CONST DDOC_ENV_9=19 ' Envelope #9 3 7/8 x 8 7/8 CONST DDOC_ENV_10=20 ' Envelope #10 4 1/8 x 9 ½ CONST DDOC_ENV_11=21 ' Envelope #11 4 ½ x 10 3/8 CONST DDOC_ENV_12=22 ' Envelope #12 4 \276 x 11 CONST DDOC_ENV_14=23 ' Envelope #14 5 x 11 ½ CONST DDOC_ENV_DL=27 ' Envelope DL 110 x 220mm CONST DDOC_ENV_C5=28 ' Envelope C5 162 x 229 mm CONST DDOC_ENV_C3=29 ' Envelope C3 324 x 458 mm CONST DDOC_ENV_C4=30 ' Envelope C4 229 x 324 mm CONST DDOC_ENV_C6=31 ' Envelope C6 114 x 162 mm CONST DDOC_ENV_C65=32 ' Envelope C65 114 x 229 mm CONST DDOC_ENV_B4=33 ' Envelope B4 250 x 353 mm CONST DDOC_ENV_B5=34 ' Envelope B5 176 x 250 mm CONST DDOC_ENV_B6=35 ' Envelope B6 176 x 125 mm CONST DDOC_ENV_ITALY=36 ' Envelope 110 x 230 mm CONST DDOC_ENV_MONARCH=37 ' Envelope Monarch 3.875 x 7.5" CONST DDOC_ENV_PERSONAL=38 ' 6 ¾ Envelope 3 5/8 x 6 ½" CONST DDOC_FANFOLD_US=39 ' US Std Fanfold 14 7/8 x 11" CONST DDOC_FANFOLD_STD_GERMAN=40 ' German Std Fanfold 8 ½ x 12" CONST DDOC_FANFOLD_LGL_GERMAN=41 ' German Legal Fan 8 ½ x 13" ' 'dpEndDoc option constants CONST DDOC_END_VIEW =0 CONST DDOC_END_PRINT =1 CONST DDOC_END_CLOSE =2 CONST DDOC_END_DELETE=4 CONST DDOC_END_PRINT_NODIALOG=8 CONST DDOC_END_FAX =16 CONST DDOC_END_EMAIL=32 CONST DDOC_END_SPECIFIC_PRINTER=64 ' 'Text alignment constants for dpText,dpPageNo,dpPageCount CONST DDOC_LEFT =0 CONST DDOC_CENTER =1 CONST DDOC_RIGHT =2 CONST DDOC_DECIMAL=3 ' 'Return constants for dpSelfExtract CONST DDOC_INPUT_NOT_FOUND =-5 CONST DDOC_OUTPUT_EXISTS =-4 CONST DDOC_ERR_OPEN_INPUT =-3 CONST DDOC_ERROR_OPEN_OUTPUT =-2 CONST DDOC_ERROR_OPEN_STUB =-1 CONST DDOC_SUCCESS = 0 ' 'Word substitution constants:used in dpChangeWords CONST DDOC_INIT_WORDS=0 ' Initialization flag CONST DDOC_MENU_FILE=1 ' File Menu CONST DDOC_MENU_DOC=2 ' Document Menu CONST DDOC_BTN_EXIT=3 ' Exit button hint and exit menu CONST DDOC_BTN_FIRST=4 ' First Button hint and menu CONST DDOC_BTN_PREV=5 ' Previous Button hint and menu CONST DDOC_BTN_NEXT=6 ' Next button hint and menu CONST DDOC_BTN_LAST=7 ' Last Button hint and menu CONST DDOC_BTN_JUMP=8 ' Jump Button hint and menu CONST DDOC_BTN_PRINT=9 ' Print hint and menu CONST DDOC_WORD_ZOOM=10 ' Zoom label caption CONST DDOC_WORD_ZOOMFIT=11 ' Zoom Fit word in drop down CONST DDOC_WORD_ZOOMWIDTH=12 ' Zoom Width in drop down CONST DDOC_WORD_DOCINDEX=13 ' Word Document index CONST DDOC_WORD_PAGE=14 ' Page CONST DDOC_WORD_OF=15 ' of CONST DDOC_DLG_JUMP_TITLE=16 ' jump dialog title CONST DDOC_DLG_JUMP_TEXT=17 ' dialog jump text CONST DDOC_BTN_CANCEL=18 ' cancel button CONST DDOC_BTN_OK=19 ' ok button CONST DDOC_DLG_PW_TITLE=20 ' password box title CONST DDOC_DLG_PW_TEXT=21 ' password text in dialog CONST DDOC_DLG_PW_INVALID=22 ' password is invalid (try again) CONST DDOC_DLG_PW_CANCEL=23 ' too many tries CONST DDOC_BTN_EMAIL=24 ' email button CONST DDOC_BTN_FAX=25 ' fax button - changed from %DDOC_BTN_FAX CONST DDOC_BTN_SAVE=26 ' save button ' 'Document generation DECLARE IMPORT,dpStartDoc(hParent:INT,zTitle:STRING,zFile:STRING,iUOM:INT,iPaper:INT,iOrient:INT,iBin:INT,iOptions:INT),INT DECLARE IMPORT,dpNewPage(iHandle:INT,iPaper:INT,iOrient:INT,iBin:INT) DECLARE IMPORT,dpBookmark(iHandle:INT,zBookmark:STRING) DECLARE IMPORT,dpEndDoc(iHandle:INT,iOptions:INT) DECLARE IMPORT,dpGetFileName(iHandle:INT,zDoc:STRING,iLen:INT) DECLARE IMPORT,dpChangeWords(iHandle:INT,iWhich:INT,zText:STRING) DECLARE IMPORT,dpSelfExtract(zInputFile:STRING,zDDOC:STRING,zOutEXE:STRING),INT DECLARE IMPORT,dpSpecifyPrinter(iHandle:INT,zInputFile:STRING),INT DECLARE IMPORT,dpSetPassword(iHandle:INT,zPass:STRING) ' DECLARE IMPORT,dpGetMajorVersion(),INT DECLARE IMPORT,dpGetMinorVersion(),INT ' 'Font and Text Functions DECLARE IMPORT,dpFont(iHandle:INT,iStyle:INT,Size:FLOAT,iColor:INT,zFontName:STRING) DECLARE IMPORT,dpText(iHandle:INT,x:FLOAT,y:FLOAT,iAlign:INT,zText:STRING) DECLARE IMPORT,dpWrapText(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,leading:FLOAT,zText:STRING),INT DECLARE IMPORT,dpWrapContinue(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,leading:FLOAT),INT DECLARE IMPORT,dpWrapCount(iHandle:INT),INT DECLARE IMPORT,dpAngleText(iHandle:INT,x:FLOAT,y:FLOAT,iAngle:INT,zText:STRING) DECLARE IMPORT,dpPageNo(iHandle:INT,x:FLOAT,y:FLOAT,iAlign:INT,iAngle:INT) DECLARE IMPORT,dpPageCount(iHandle:INT,x:FLOAT,y:FLOAT,iAlign:INT,iAngle:INT) DECLARE IMPORT,dpTextWidth(iHandle:INT,zText:STRING),FLOAT DECLARE IMPORT,dpSetTabs(iHandle:INT,zTabStops:STRING) DECLARE IMPORT,dpTabText(iHandle:INT,y:FLOAT,zText$:STRING) DECLARE IMPORT,dpClipText(iHandle:INT,x:FLOAT,y:FLOAT,w:FLOAT,iAlign:INT,sText$:STRING) DECLARE IMPORT,dpFontSpacing(iHandle:INT,dblSpacing:DOUBLE) ' 'Lines and Graphics DECLARE IMPORT,dpAddGraphic(iHandle:INT,zFileName$:STRING),INT DECLARE IMPORT,dpEmbedGraphic(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,zFileName:STRING) DECLARE IMPORT,dpGraphic(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,zFileName:STRING) DECLARE IMPORT,dpLine(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,w:FLOAT,c:INT) DECLARE IMPORT,dpRect(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,w:FLOAT,iFillColor:INT,iBorderColor:INT) DECLARE IMPORT,dpArc(iHandle:INT,x1:FLOAT,y1:FLOAT,x2:FLOAT,y2:FLOAT,aStart:INT,aEnd:INT,w:INT,iColor:INT) DECLARE IMPORT,dpDrawGraphic(iHandle:INT,hGraphic:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT),INT DECLARE IMPORT,dpEllipse(iHandle:INT,x:FLOAT,y:FLOAT,x2:FLOAT,y2:FLOAT,w:FLOAT,iFillColor:INT,iBorderColor:INT) ' 'Mailing Label API DECLARE IMPORT,dpMailInit(iHandle:INT,szIniFile:STRING,szIniSection:STRING,nAlign:INT),INT DECLARE IMPORT,dpLabelLines(iHandle:INT),INT DECLARE IMPORT,dpLabelsPerPage(iHandle:INT),INT DECLARE IMPORT,dpLabelText(iHandle:INT,szLabelLine:STRING) DECLARE IMPORT,dpNextLabel(iHandle:INT) DECLARE IMPORT,dpSetLabelLine(iHandle:INT,nLabelLine:INT) DECLARE IMPORT,dpSetLabel(iHandle:INT,nLabelNumber:INT) DECLARE IMPORT,dpPrintTemplate(iHandle:INT,LabAlign:INT) DECLARE IMPORT,dpLabelX(iHandle:INT,sngX:FLOAT) DECLARE IMPORT,dpLabelY(iHandle:INT,sngY:FLOAT) ' 'Colour Constants (VB compatible) CONST vbBlack=0x0 CONST vbRed=0xFF CONST vbGreen=0xFF00 CONST vbYellow=0xFFFF CONST vbBlue=0xFF0000 CONST vbMagenta=0xFF00FF CONST vbCyan=0xFFFF00 CONST vbWhite=0xFFFFFF CONST vbGrey=0xC0C0C0 CONST bbBlue=0x7A1D00 'Birchfield colour CONST bpLightShade=0xE0E0E0 CONST bpBlue=0x7A1D00 'Birchfield colour CONST bpGrey=0xA9A9A9 CONST bpTeal=0x626200 CONST penBlack=0x0A0217 CONST penBlue=0xF6200D