home *** CD-ROM | disk | FTP | other *** search
/ PC World Plus! (NZ) 2001 June / HDC50.iso / Runimage / Delphi50 / Ocx / Vci / Form1 / VCF1.PAS < prev   
Pascal/Delphi Source File  |  1999-08-11  |  88KB  |  2,169 lines

  1. unit vcf1;
  2.  
  3. { This file contains pascal declarations imported from a type library.
  4.   This file will be written during each import or refresh of the type
  5.   library editor.  Changes to this file will be discarded during the
  6.   refresh process. }
  7.  
  8. { VCI Formula One Library }
  9. { Version 1.0 }
  10.  
  11. { Conversion log:
  12.   Warning: 'Type' is a reserved word. _DVCF1.Type changed to Type_
  13.  }
  14.  
  15. interface
  16.  
  17. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  18.  
  19. const
  20.   LIBID_VCIF1Lib: TGUID = '{042BADC8-5E58-11CE-B610-524153480001}';
  21.  
  22. const
  23.  
  24. { Specify how column widths are stored and displayed }
  25.  
  26. { F1ColWidthUnitsConstants }
  27.  
  28.   F1ColWidthUnitsCharacters = 0;
  29.   F1ColWidthUnitsTwips = 1;
  30.  
  31. { Specify appearance of mouse. }
  32.  
  33. { F1MousePointerConstants }
  34.  
  35.   F1Default = 0;
  36.   F1Arrow = 1;
  37.   F1Cross = 2;
  38.   F1IBeam = 3;
  39.   F1Icon = 4;
  40.   F1Size = 5;
  41.   F1SizeNESW = 6;
  42.   F1SizeNS = 7;
  43.   F1SizeNWSE = 8;
  44.   F1SizeWE = 9;
  45.   F1UpArrow = 10;
  46.   F1Hourglass = 11;
  47.   F1NoDrop = 12;
  48.   F1Custom = 13;
  49.  
  50. { Specifies behaviour of scroll bars and selections. }
  51.  
  52. { F1ShowOffOnAutoConstants }
  53.  
  54.   F1Off = 0;
  55.   F1On = 1;
  56.   F1Auto = 2;
  57.  
  58. { Specify sheet tab behavior. }
  59.  
  60. { F1ShowTabsConstants }
  61.  
  62.   F1TabsOff = 0;
  63.   F1TabsBottom = 1;
  64.   F1TabsTop = 2;
  65.  
  66. { Specify cursor mode for drawing objects. }
  67.  
  68. { F1ModeConstants }
  69.  
  70.   F1ModeNormal = 0;
  71.   F1ModeLine = 1;
  72.   F1ModeRectangle = 2;
  73.   F1ModeOval = 3;
  74.   F1ModeArc = 4;
  75.   F1ModeChart = 5;
  76.   F1ModeField = 6;
  77.   F1ModeButton = 7;
  78.   F1ModePolygon = 8;
  79.   F1ModeCheckBox = 9;
  80.   F1ModeDropDown = 10;
  81.  
  82. { Specify polygon editing mode. }
  83.  
  84. { F1PolyEditModeConstants }
  85.  
  86.   F1PolyEditModeNormal = 0;
  87.   F1PolyEditModePoints = 1;
  88.  
  89. { Specify how data is shifted when new cells are inserted or deleted. }
  90.  
  91. { F1ShiftTypeConstants }
  92.  
  93.   F1ShiftHorizontal = 1;
  94.   F1ShiftVertical = 2;
  95.   F1ShiftRows = 3;
  96.   F1ShiftCols = 4;
  97.  
  98. { Specify how data is aligned horizontally. }
  99.  
  100. { F1HAlignConstants }
  101.  
  102.   F1HAlignGeneral = 1;
  103.   F1HAlignLeft = 2;
  104.   F1HAlignCenter = 3;
  105.   F1HAlignRight = 4;
  106.   F1HAlignFill = 5;
  107.   F1HAlignJustify = 6;
  108.   F1HAlignCenterAcrossCells = 7;
  109.  
  110. { Specify how data is aligned vertically. }
  111.  
  112. { F1VAlignConstants }
  113.  
  114.   F1VAlignTop = 1;
  115.   F1VAlignCenter = 2;
  116.   F1VAlignBottom = 3;
  117.  
  118. { Specify how data is cleared. }
  119.  
  120. { F1ClearTypeConstants }
  121.  
  122.   F1ClearDlg = 0;
  123.   F1ClearAll = 1;
  124.   F1ClearFormats = 2;
  125.   F1ClearValues = 3;
  126.  
  127. { Specify a file type. }
  128.  
  129. { F1FileTypeConstants }
  130.  
  131.   F1FileFormulaOne = 1;
  132.   F1FileExcel4 = 2;
  133.   F1FileTabbedText = 3;
  134.   F1FileExcel5 = 4;
  135.   F1FileFormulaOne3 = 5;
  136.   F1FileTabbedTextValuesOnly = 6;
  137.  
  138. { Specify an object type. }
  139.  
  140. { F1ObjTypeConstants }
  141.  
  142.   F1ObjLine = 1;
  143.   F1ObjRectangle = 2;
  144.   F1ObjOval = 3;
  145.   F1ObjArc = 4;
  146.   F1ObjChart = 5;
  147.   F1ObjButton = 7;
  148.   F1ObjPolygon = 8;
  149.   F1ObjCheckBox = 9;
  150.   F1ObjDropDown = 10;
  151.   F1ObjPicture = 11;
  152.  
  153. { Formula One error constants. }
  154.  
  155. { F1ErrorConstants }
  156.  
  157.   F1ErrorNone = 0;
  158.   F1ErrorGeneral = 20001;
  159.   F1ErrorBadArgument = 20002;
  160.   F1ErrorNoMemory = 20003;
  161.   F1ErrorBadFormula = 20004;
  162.   F1ErrorBufTooShort = 20005;
  163.   F1ErrorNotFound = 20006;
  164.   F1ErrorBadRC = 20007;
  165.   F1ErrorBadHSS = 20008;
  166.   F1ErrorTooManyHSS = 20009;
  167.   F1ErrorNoTable = 20010;
  168.   F1ErrorUnableToOpenFile = 20011;
  169.   F1ErrorInvalidFile = 20012;
  170.   F1ErrorInsertShiftOffTable = 20013;
  171.   F1ErrorOnlyOneRange = 20014;
  172.   F1ErrorNothingToPaste = 20015;
  173.   F1ErrorBadNumberFormat = 20016;
  174.   F1ErrorTooManyFonts = 20017;
  175.   F1ErrorTooManySelectedRanges = 20018;
  176.   F1ErrorUnableToWriteFile = 20019;
  177.   F1ErrorNoTransaction = 20020;
  178.   F1ErrorNothingToPrint = 20021;
  179.   F1ErrorPrintMarginsDontFit = 20022;
  180.   F1ErrorCancel = 20023;
  181.   F1ErrorUnableToInitializePrinter = 20024;
  182.   F1ErrorStringTooLong = 20025;
  183.   F1ErrorFormulaTooLong = 20026;
  184.   F1ErrorUnableToOpenClipboard = 20027;
  185.   F1ErrorPasteWouldOverflowSheet = 20028;
  186.   F1ErrorLockedCellsCannotBeModified = 20029;
  187.   F1ErrorLockedDocCannotBeModified = 20030;
  188.   F1ErrorInvalidName = 20031;
  189.   F1ErrorCannotDeleteNameInUse = 20032;
  190.   F1ErrorUnableToFindName = 20033;
  191.   F1ErrorNoWindow = 20034;
  192.   F1ErrorSelection = 20035;
  193.   F1ErrorTooManyObjects = 20036;
  194.   F1ErrorInvalidObjectType = 20037;
  195.   F1ErrorObjectNotFound = 20038;
  196.   F1ErrorInvalidRequest = 20039;
  197.   F1ErrorBadValidationRule = 20040;
  198.   F1ErrorBadInputMask = 20041;
  199.   F1ErrorValidationFailed = 20042;
  200.   F1ErrorNoODBCConnection = 20043;
  201.   F1ErrorUnableToLoadODBC = 20044;
  202.   F1ErrorUnsupportedFeature = 20045;
  203.  
  204. { Specify cell reference behavior for list box. }
  205.  
  206. { F1ControlCellConstants }
  207.  
  208.   F1ControlNoCell = 0;
  209.   F1ControlCellValue = 1;
  210.   F1ControlCellText = 2;
  211.  
  212. const
  213.  
  214. { Component class GUIDs }
  215.   Class_F1Book: TGUID = '{042BADC5-5E58-11CE-B610-524153480001}';
  216.  
  217. type
  218.  
  219. { Forward declarations }
  220. { Forward declarations: Interfaces }
  221.   _DVCF1 = dispinterface;
  222.   _DVCF1Events = dispinterface;
  223.  
  224. { Forward declarations: CoClasses }
  225.   F1Book = _DVCF1;
  226.  
  227. { Forward declarations: Enums }
  228.   F1ColWidthUnitsConstants = TOleEnum;
  229.   F1MousePointerConstants = TOleEnum;
  230.   F1ShowOffOnAutoConstants = TOleEnum;
  231.   F1ShowTabsConstants = TOleEnum;
  232.   F1ModeConstants = TOleEnum;
  233.   F1PolyEditModeConstants = TOleEnum;
  234.   F1ShiftTypeConstants = TOleEnum;
  235.   F1HAlignConstants = TOleEnum;
  236.   F1VAlignConstants = TOleEnum;
  237.   F1ClearTypeConstants = TOleEnum;
  238.   F1FileTypeConstants = TOleEnum;
  239.   F1ObjTypeConstants = TOleEnum;
  240.   F1ErrorConstants = TOleEnum;
  241.   F1ControlCellConstants = TOleEnum;
  242.  
  243. { Dispatch interface for Formula One Workbook }
  244.  
  245.   _DVCF1 = dispinterface
  246.     ['{042BADC6-5E58-11CE-B610-524153480001}']
  247.     property BackColor: TColor dispid 3;
  248.     property Col: Integer dispid 4;
  249.     property Row: Integer dispid 5;
  250.     property ShowHScrollBar: Smallint dispid 6;
  251.     property Text: WideString dispid 7;
  252.     property Number: Double dispid 8;
  253.     property Formula: WideString dispid 9;
  254.     property FixedCol: Integer dispid 10;
  255.     property FixedCols: Integer dispid 11;
  256.     property FixedRow: Integer dispid 12;
  257.     property FixedRows: Integer dispid 13;
  258.     property ShowGridLines: WordBool dispid 14;
  259.     property ShowRowHeading: WordBool dispid 15;
  260.     property ShowSelections: Smallint dispid 16;
  261.     property LeftCol: Integer dispid 17;
  262.     property MaxCol: Integer dispid 18;
  263.     property MaxRow: Integer dispid 19;
  264.     property TopRow: Integer dispid 20;
  265.     property AllowResize: WordBool dispid 21;
  266.     property AllowSelections: WordBool dispid 22;
  267.     property AllowFormulas: WordBool dispid 23;
  268.     property AllowInCellEditing: WordBool dispid 24;
  269.     property ShowVScrollBar: Smallint dispid 25;
  270.     property AllowFillRange: WordBool dispid 26;
  271.     property AllowMoveRange: WordBool dispid 27;
  272.     property SelStartCol: Integer dispid 28;
  273.     property SelStartRow: Integer dispid 29;
  274.     property SelEndCol: Integer dispid 30;
  275.     property SelEndRow: Integer dispid 31;
  276.     property ExtraColor: TColor dispid 32;
  277.     property FileName: WideString dispid 33;
  278.     property AutoRecalc: WordBool dispid 34;
  279.     property PrintGridLines: WordBool dispid 35;
  280.     property PrintRowHeading: WordBool dispid 36;
  281.     property PrintHCenter: WordBool dispid 37;
  282.     property PrintVCenter: WordBool dispid 38;
  283.     property PrintLeftToRight: WordBool dispid 39;
  284.     property PrintHeader: WideString dispid 40;
  285.     property PrintFooter: WideString dispid 41;
  286.     property PrintLeftMargin: Double dispid 42;
  287.     property PrintTopMargin: Double dispid 43;
  288.     property PrintRightMargin: Double dispid 44;
  289.     property PrintBottomMargin: Double dispid 45;
  290.     property PrintArea: WideString dispid 46;
  291.     property PrintTitles: WideString dispid 47;
  292.     property PrintNoColor: WordBool dispid 48;
  293.     property Selection: WideString dispid 49;
  294.     property TableName: WideString dispid 50;
  295.     property DoCancelEdit: WordBool dispid 51;
  296.     property DoSelChange: WordBool dispid 52;
  297.     property DoStartEdit: WordBool dispid 53;
  298.     property DoEndEdit: WordBool dispid 54;
  299.     property DoStartRecalc: WordBool dispid 55;
  300.     property DoEndRecalc: WordBool dispid 56;
  301.     property DoClick: WordBool dispid 57;
  302.     property DoDblClick: WordBool dispid 58;
  303.     property ShowColHeading: WordBool dispid 59;
  304.     property PrintColHeading: WordBool dispid 60;
  305.     property Entry: WideString dispid 61;
  306.     property Repaint: WordBool dispid 62;
  307.     property AllowArrows: WordBool dispid 63;
  308.     property AllowTabs: WordBool dispid 64;
  309.     property FormattedText: WideString dispid 65;
  310.     property RowMode: WordBool dispid 66;
  311.     property AllowDelete: WordBool dispid 67;
  312.     property EnableProtection: WordBool dispid 68;
  313.     property MinCol: Integer dispid 69;
  314.     property MinRow: Integer dispid 70;
  315.     property DoTopLeftChanged: WordBool dispid 71;
  316.     property AllowEditHeaders: WordBool dispid 72;
  317.     property DoObjClick: WordBool dispid 73;
  318.     property DoObjDblClick: WordBool dispid 74;
  319.     property AllowObjSelections: WordBool dispid 75;
  320.     property DoRClick: WordBool dispid 76;
  321.     property DoRDblClick: WordBool dispid 77;
  322.     property Clip: WideString dispid 78;
  323.     property ClipValues: WideString dispid 79;
  324.     property PrintLandscape: WordBool dispid 80;
  325.     property Enabled: WordBool dispid -514;
  326.     property BorderStyle: Smallint dispid -504;
  327.     property AppName: WideString dispid 81;
  328.     property HdrHeight: Smallint dispid 82;
  329.     property HdrWidth: Smallint dispid 83;
  330.     property NumberFormat: WideString dispid 84;
  331.     property TopLeftText: WideString dispid 85;
  332.     property EnterMovesDown: WordBool dispid 86;
  333.     property LastCol: Integer dispid 87;
  334.     property LastRow: Integer dispid 88;
  335.     property Logical: WordBool dispid 89;
  336.     property Mode: Smallint dispid 90;
  337.     property PolyEditMode: Smallint dispid 91;
  338.     property ViewScale: Smallint dispid 92;
  339.     property SelectionCount: Smallint dispid 93;
  340.     property Title: WideString dispid 94;
  341.     property Type_: Smallint dispid 95;
  342.     property ShowFormulas: WordBool dispid 96;
  343.     property ShowZeroValues: WordBool dispid 97;
  344.     property MousePointer: Smallint dispid 2;
  345.     property MouseIcon: IPictureDisp dispid 98;
  346.     property DoObjValueChanged: WordBool dispid 99;
  347.     property ScrollToLastRC: WordBool dispid 100;
  348.     property Modified: WordBool dispid 101;
  349.     property DoObjGotFocus: WordBool dispid 102;
  350.     property DoObjLostFocus: WordBool dispid 103;
  351.     property PrintDevMode: OLE_HANDLE dispid 104;
  352.     property NumSheets: Integer dispid 105;
  353.     property Sheet: Integer dispid 106;
  354.     property ColWidthUnits: Smallint dispid 107;
  355.     property ShowTypeMarkers: WordBool dispid 108;
  356.     property ShowTabs: Smallint dispid 109;
  357.     property ShowEditBar: WordBool dispid 110;
  358.     property ShowEditBarCellRef: WordBool dispid 111;
  359.     property AllowDesigner: WordBool dispid 1;
  360.     property hWnd: OLE_HANDLE dispid -515;
  361.     property AllowAutoFill: WordBool dispid 112;
  362.     property ColText[nCol: Integer]: WideString dispid 272;
  363.     property DefinedName[const pName: WideString]: WideString dispid 273;
  364.     property EntryRC[nRow, nCol: Integer]: WideString dispid 274;
  365.     property FormattedTextRC[nRow, nCol: Integer]: WideString dispid 275;
  366.     property FormulaRC[nRow, nCol: Integer]: WideString dispid 276;
  367.     property LastColForRow[nRow: Integer]: Integer dispid 277;
  368.     property LogicalRC[nRow, nCol: Integer]: WordBool dispid 278;
  369.     property NumberRC[nRow, nCol: Integer]: Double dispid 279;
  370.     property RowText[nRow: Integer]: WideString dispid 280;
  371.     property TextRC[nRow, nCol: Integer]: WideString dispid 281;
  372.     property TypeRC[nRow, nCol: Integer]: Smallint dispid 282;
  373.     procedure EditPasteValues; dispid 113;
  374.     procedure GetAlignment(var pHorizontal: Smallint; var pWordWrap: WordBool; var pVertical, pOrientation: Smallint); dispid 114;
  375.     procedure GetBorder(var pLeft, pRight, pTop, pBottom, pShade: Smallint; var pcrLeft, pcrRight, pcrTop, pcrBottom: TColor); dispid 115;
  376.     procedure GetFont(var pName: WideString; var pSize: Smallint; var pBold, pItalic, pUnderline, pStrikeout: WordBool; var pcrColor: TColor; var pOutline, pShadow: WordBool); dispid 116;
  377.     procedure GetLineStyle(var pStyle: Smallint; var pcrColor: TColor; var pWeight: Smallint); dispid 117;
  378.     procedure GetPattern(var pPattern: Smallint; var pcrFG, pcrBG: TColor); dispid 118;
  379.     procedure GetProtection(var pLocked, pHidden: WordBool); dispid 119;
  380.     procedure GetTabbedText(nR1, nC1, nR2, nC2: Integer; bValuesOnly: WordBool; var phText: OLE_HANDLE); dispid 120;
  381.     procedure SetTabbedText(nStartRow, nStartCol: Integer; var pRows, pCols: Integer; bValuesOnly: WordBool; const pText: WideString); dispid 121;
  382.     procedure AddColPageBreak(nCol: Integer); dispid 122;
  383.     procedure AddPageBreak; dispid 123;
  384.     procedure AddRowPageBreak(nRow: Integer); dispid 124;
  385.     procedure AddSelection(nR1, nC1, nR2, nC2: Integer); dispid 125;
  386.     procedure Attach(const pTitle: WideString); dispid 126;
  387.     procedure AttachToSS(hSrcSS: Integer); dispid 127;
  388.     procedure CalculationDlg; dispid 128;
  389.     procedure CancelEdit; dispid 129;
  390.     procedure CheckRecalc; dispid 130;
  391.     procedure ClearClipboard; dispid 131;
  392.     procedure ClearRange(nR1, nC1, nR2, nC2: Integer; ClearType: Smallint); dispid 132;
  393.     procedure ColorPaletteDlg; dispid 133;
  394.     procedure ColWidthDlg; dispid 134;
  395.     procedure CopyAll(hSrcSS: Integer); dispid 135;
  396.     procedure CopyRange(nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcR1, nSrcC1, nSrcR2, nSrcC2: Integer); dispid 136;
  397.     procedure DefinedNameDlg; dispid 137;
  398.     procedure DeleteDefinedName(const pName: WideString); dispid 138;
  399.     procedure DeleteRange(nR1, nC1, nR2, nC2: Integer; ShiftType: Smallint); dispid 139;
  400.     procedure Draw(hDC: OLE_HANDLE; x, y, cx, cy, nRow, nCol: Integer; var pRows, pCols: Integer; nFixedRow, nFixedCol, nFixedRows, nFixedCols: Integer); dispid 140;
  401.     procedure EditClear(ClearType: Smallint); dispid 141;
  402.     procedure EditCopy; dispid 142;
  403.     procedure EditCopyDown; dispid 143;
  404.     procedure EditCopyRight; dispid 144;
  405.     procedure EditCut; dispid 145;
  406.     procedure EditDelete(ShiftType: Smallint); dispid 146;
  407.     procedure EditInsert(ShiftType: Smallint); dispid 147;
  408.     procedure EditPaste; dispid 148;
  409.     procedure EndEdit; dispid 149;
  410.     procedure FilePageSetupDlg; dispid 150;
  411.     procedure FilePrint(bShowPrintDlg: WordBool); dispid 151;
  412.     procedure FilePrintSetupDlg; dispid 152;
  413.     procedure FormatAlignmentDlg; dispid 153;
  414.     procedure FormatBorderDlg; dispid 154;
  415.     procedure FormatCurrency0; dispid 155;
  416.     procedure FormatCurrency2; dispid 156;
  417.     procedure FormatDefaultFontDlg; dispid 157;
  418.     procedure FormatFixed; dispid 158;
  419.     procedure FormatFixed2; dispid 159;
  420.     procedure FormatFontDlg; dispid 160;
  421.     procedure FormatFraction; dispid 161;
  422.     procedure FormatGeneral; dispid 162;
  423.     procedure FormatHmmampm; dispid 163;
  424.     procedure FormatMdyy; dispid 164;
  425.     procedure FormatNumberDlg; dispid 165;
  426.     procedure FormatPatternDlg; dispid 166;
  427.     procedure FormatPercent; dispid 167;
  428.     procedure FormatScientific; dispid 168;
  429.     procedure GetActiveCell(var pRow, pCol: Integer); dispid 169;
  430.     property ColWidth[nCol: Integer]: Smallint dispid 283;
  431.     property RowHeight[nRow: Integer]: Smallint dispid 284;
  432.     procedure GetDefaultFont(var pBuf: WideString; var pSize: Smallint); dispid 170;
  433.     procedure GetHdrSelection(var pTopLeftHdr, pRowHdr, pColHdr: WordBool); dispid 171;
  434.     procedure GetIteration(var pIteration: WordBool; var pMaxIterations: Smallint; var pMaxChange: Double); dispid 172;
  435.     procedure GetPrintScale(var pScale: Smallint; var pFitToPage: WordBool; var pVPages, pHPages: Integer); dispid 173;
  436.     procedure GetSelection(nSelection: Smallint; var pR1, pC1, pR2, pC2: Integer); dispid 174;
  437.     procedure GotoDlg; dispid 175;
  438.     procedure HeapMin; dispid 176;
  439.     procedure InitTable; dispid 177;
  440.     procedure InsertRange(nR1, nC1, nR2, nC2: Integer; ShiftType: Smallint); dispid 178;
  441.     procedure LineStyleDlg; dispid 179;
  442.     procedure MoveRange(nR1, nC1, nR2, nC2, nRowOffset, nColOffset: Integer); dispid 180;
  443.     procedure ObjAddItem(ID: Integer; const pItem: WideString); dispid 181;
  444.     procedure ObjAddSelection(ID: Integer); dispid 182;
  445.     procedure ObjBringToFront; dispid 183;
  446.     procedure ObjDeleteItem(ID: Integer; nItem: Smallint); dispid 184;
  447.     procedure ObjGetCell(ID: Integer; var pControlCellType: Smallint; var pRow, pCol: Integer); dispid 185;
  448.     procedure ObjGetPos(ID: Integer; var pX1, pY1, pX2, pY2: Single); dispid 186;
  449.     procedure ObjGetSelection(nSelection: Smallint; var pID: Integer); dispid 187;
  450.     procedure ObjInsertItem(ID: Integer; nItem: Smallint; const pItem: WideString); dispid 188;
  451.     procedure ObjNameDlg; dispid 189;
  452.     procedure ObjNew(ObjType: Smallint; nX1, nY1, nX2, nY2: Single; var pID: Integer); dispid 190;
  453.     procedure ObjNewPicture(nX1, nY1, nX2, nY2: Single; var pID: Integer; hMF: OLE_HANDLE; nMapMode, nWndExtentX, nWndExtentY: Integer); dispid 191;
  454.     procedure ObjOptionsDlg; dispid 192;
  455.     procedure ObjPosToTwips(nX1, nY1, nX2, nY2: Single; var pX, pY, pCX, pCY: Integer; var pShown: Smallint); dispid 193;
  456.     procedure ObjSendToBack; dispid 194;
  457.     procedure ObjSetCell(ID: Integer; ControlCellType: Smallint; nRow, nCol: Integer); dispid 195;
  458.     procedure ObjSetPicture(ID: Integer; hMF: OLE_HANDLE; nMapMode: Smallint; nWndExtentX, nWndExtentY: Integer); dispid 196;
  459.     procedure ObjSetPos(ID: Integer; nX1, nY1, nX2, nY2: Single); dispid 197;
  460.     procedure ObjSetSelection(ID: Integer); dispid 198;
  461.     procedure OpenFileDlg(const pTitle: WideString; hWndParent: OLE_HANDLE; var pBuf: WideString); dispid 199;
  462.     procedure ProtectionDlg; dispid 200;
  463.     procedure RangeToTwips(nRow1, nCol1, nRow2, nCol2: Integer; var pX, pY, pCX, pCY: Integer; var pShown: Smallint); dispid 201;
  464.     procedure Read(const pPathName: WideString; var pFileType: Smallint); dispid 202;
  465.     procedure ReadFromBlob(hBlob: OLE_HANDLE; nReservedBytes: Smallint); dispid 203;
  466.     procedure Recalc; dispid 204;
  467.     procedure RemoveColPageBreak(nCol: Integer); dispid 205;
  468.     procedure RemovePageBreak; dispid 206;
  469.     procedure RemoveRowPageBreak(nRow: Integer); dispid 207;
  470.     procedure RowHeightDlg; dispid 208;
  471.     procedure SaveFileDlg(const pTitle: WideString; var pBuf: WideString; var pFileType: Smallint); dispid 209;
  472.     procedure SaveWindowInfo; dispid 210;
  473.     procedure SetActiveCell(nRow, nCol: Integer); dispid 211;
  474.     procedure SetAlignment(HAlign: Smallint; bWordWrap: WordBool; VAlign, nOrientation: Smallint); dispid 212;
  475.     procedure SetBorder(nOutline, nLeft, nRight, nTop, nBottom, nShade: Smallint; crOutline, crLeft, crRight, crTop, crBottom: TColor); dispid 213;
  476.     procedure SetColWidth(nC1, nC2: Integer; nWidth: Smallint; bDefColWidth: WordBool); dispid 214;
  477.     procedure SetColWidthAuto(nR1, nC1, nR2, nC2: Integer; bSetDefaults: WordBool); dispid 215;
  478.     procedure SetDefaultFont(const pName: WideString; nSize: Smallint); dispid 216;
  479.     procedure SetFont(const pName: WideString; nSize: Smallint; bBold, bItalic, bUnderline, bStrikeout: WordBool; crColor: TColor; bOutline, bShadow: WordBool); dispid 217;
  480.     procedure SetHdrSelection(bTopLeftHdr, bRowHdr, bColHdr: WordBool); dispid 218;
  481.     procedure SetIteration(bIteration: WordBool; nMaxIterations: Smallint; nMaxChange: Double); dispid 219;
  482.     procedure SetLineStyle(nStyle: Smallint; crColor: TColor; nWeight: Smallint); dispid 220;
  483.     procedure SetPattern(nPattern: Smallint; crFG, crBG: TColor); dispid 221;
  484.     procedure SetPrintAreaFromSelection; dispid 222;
  485.     procedure SetPrintScale(nScale: Smallint; bFitToPage: WordBool; nVPages, nHPages: Smallint); dispid 223;
  486.     procedure SetPrintTitlesFromSelection; dispid 224;
  487.     procedure SetProtection(bLocked, bHidden: WordBool); dispid 225;
  488.     procedure SetRowHeight(nR1, nR2: Integer; nHeight: Smallint; bDefRowHeight: WordBool); dispid 226;
  489.     procedure SetRowHeightAuto(nR1, nC1, nR2, nC2: Integer; bSetDefaults: WordBool); dispid 227;
  490.     procedure SetSelection(nR1, nC1, nR2, nC2: Integer); dispid 228;
  491.     procedure ShowActiveCell; dispid 229;
  492.     procedure Sort3(nR1, nC1, nR2, nC2: Integer; bSortByRows: WordBool; nKey1, nKey2, nKey3: Integer); dispid 230;
  493.     procedure SortDlg; dispid 231;
  494.     procedure StartEdit(bClear, bInCellEditFocus, bArrowsExitEditMode: WordBool); dispid 232;
  495.     procedure SwapTables(hSS2: Integer); dispid 233;
  496.     procedure TransactCommit; dispid 234;
  497.     procedure TransactRollback; dispid 235;
  498.     procedure TransactStart; dispid 236;
  499.     procedure TwipsToRC(x, y: Integer; var pRow, pCol: Integer); dispid 237;
  500.     procedure SSUpdate; dispid 238;
  501.     function SSVersion: Smallint; dispid 239;
  502.     procedure Write(const pPathName: WideString; FileType: Smallint); dispid 240;
  503.     procedure WriteToBlob(var phBlob: OLE_HANDLE; nReservedBytes: Smallint); dispid 241;
  504.     procedure SetRowHidden(nRow1, nRow2: Integer; bHidden: WordBool); dispid 242;
  505.     procedure SetColHidden(nCol1, nCol2: Integer; bHidden: WordBool); dispid 243;
  506.     procedure SetColWidthTwips(nCol1, nCol2, nWidth: Integer; bDefColWidth: WordBool); dispid 244;
  507.     property DefinedNameByIndex[nName: Integer]: WideString dispid 285;
  508.     property SheetName[nSheet: Integer]: WideString dispid 286;
  509.     property PaletteEntry[nEntry: Integer]: TColor dispid 287;
  510.     procedure EditInsertSheets; dispid 245;
  511.     procedure EditDeleteSheets; dispid 246;
  512.     procedure InsertSheets(nSheet, nSheets: Integer); dispid 247;
  513.     procedure DeleteSheets(nSheet, nSheets: Integer); dispid 248;
  514.     procedure Refresh; dispid -550;
  515.     property ColWidthTwips[Col: Integer]: Smallint dispid 288;
  516.     function NextColPageBreak(Col: Integer): Integer; dispid 249;
  517.     function NextRowPageBreak(Row: Integer): Integer; dispid 250;
  518.     function ObjFirstID: Integer; dispid 251;
  519.     function ObjNextID(ID: Integer): Integer; dispid 252;
  520.     function ObjGetItemCount(ID: Integer): Smallint; dispid 253;
  521.     function ObjGetType(ID: Integer): Smallint; dispid 254;
  522.     function ObjGetSelectionCount: Smallint; dispid 255;
  523.     function FormatRCNr(Row, Col: Integer; DoAbsolute: WordBool): WideString; dispid 256;
  524.     function SS: Integer; dispid 257;
  525.     function ErrorNumberToText(SSError: Integer): WideString; dispid 258;
  526.     property ObjItem[ID: Integer; Item: Smallint]: WideString dispid 289;
  527.     property ObjItems[ID: Integer]: WideString dispid 290;
  528.     property ObjName[ID: Integer]: WideString dispid 291;
  529.     property ObjText[ID: Integer]: WideString dispid 292;
  530.     property ObjValue[ID: Integer]: Smallint dispid 293;
  531.     property ObjVisible[ID: Integer]: WordBool dispid 294;
  532.     function ObjNameToID(const Name: WideString): Integer; dispid 259;
  533.     function DefinedNameCount: Integer; dispid 260;
  534.     property AutoFillItems[Index: Smallint]: WideString dispid 295;
  535.     procedure ValidationRuleDlg; dispid 261;
  536.     procedure SetValidationRule(const Rule, Text: WideString); dispid 262;
  537.     procedure GetValidationRule(var Rule, Text: WideString); dispid 263;
  538.     function AutoFillItemsCount: Smallint; dispid 264;
  539.     procedure CopyRangeEx(nDstSheet, nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcSheet, nSrcR1, nSrcC1, nSrcR2, nSrcC2: Integer); dispid 265;
  540.     procedure Sort(nR1, nC1, nR2, nC2: Integer; bSortByRows: WordBool; Keys: OleVariant); dispid 266;
  541.     property ColHidden[nCol: Integer]: WordBool dispid 296;
  542.     property RowHidden[nRow: Integer]: WordBool dispid 297;
  543.     procedure DeleteAutoFillItems(nIndex: Smallint); dispid 267;
  544.     procedure ODBCConnect(var pConnect: WideString; bShowErrors: WordBool; var pRetCode: Smallint); dispid 268;
  545.     procedure ODBCDisconnect; dispid 269;
  546.     procedure ODBCQuery(var pQuery: WideString; nRow, nCol: Integer; bForceShowDlg: WordBool; var pSetColNames, pSetColFormats, pSetColWidths, pSetMaxRC: WordBool; var pRetCode: Smallint); dispid 270;
  547.     property SheetSelected[nSheet: Integer]: WordBool dispid 298;
  548.     procedure LaunchDesigner; dispid 271;
  549.     procedure AboutBox; dispid -552;
  550.   end;
  551.  
  552. { Event interface for Formula One Workbook }
  553.  
  554.   _DVCF1Events = dispinterface
  555.     ['{042BADC7-5E58-11CE-B610-524153480001}']
  556.     procedure Click(nRow, nCol: Integer); dispid 1;
  557.     procedure DblClick(nRow, nCol: Integer); dispid 2;
  558.     procedure CancelEdit; dispid 3;
  559.     procedure SelChange; dispid 4;
  560.     procedure StartEdit(var EditString: WideString; var Cancel: Smallint); dispid 5;
  561.     procedure EndEdit(var EditString: WideString; var Cancel: Smallint); dispid 6;
  562.     procedure StartRecalc; dispid 7;
  563.     procedure EndRecalc; dispid 8;
  564.     procedure TopLeftChanged; dispid 9;
  565.     procedure ObjClick(var ObjName: WideString; ObjID: Integer); dispid 10;
  566.     procedure ObjDblClick(var ObjName: WideString; ObjID: Integer); dispid 11;
  567.     procedure RClick(nRow, nCol: Integer); dispid 12;
  568.     procedure RDblClick(nRow, nCol: Integer); dispid 13;
  569.     procedure ObjValueChanged(var ObjName: WideString; ObjID: Integer); dispid 14;
  570.     procedure Modified; dispid 15;
  571.     procedure MouseDown(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -605;
  572.     procedure MouseUp(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -607;
  573.     procedure MouseMove(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -606;
  574.     procedure ObjGotFocus(var ObjName: WideString; ObjID: Integer); dispid 16;
  575.     procedure ObjLostFocus(var ObjName: WideString; ObjID: Integer); dispid 17;
  576.     procedure ValidationFailed(var pEntry: WideString; nSheet, nRow, nCol: Integer; var pShowMessage: WideString; var pAction: Smallint); dispid 18;
  577.     procedure KeyPress(var KeyAscii: Smallint); dispid -603;
  578.     procedure KeyDown(var KeyCode: Smallint; Shift: Smallint); dispid -602;
  579.     procedure KeyUp(var KeyCode: Smallint; Shift: Smallint); dispid -604;
  580.   end;
  581.  
  582. { VCI Formula One Workbook }
  583.  
  584.   TF1BookClick = procedure(Sender: TObject; nRow, nCol: Integer) of object;
  585.   TF1BookDblClick = procedure(Sender: TObject; nRow, nCol: Integer) of object;
  586.   TF1BookStartEdit = procedure(Sender: TObject; var EditString: WideString; var Cancel: Smallint) of object;
  587.   TF1BookEndEdit = procedure(Sender: TObject; var EditString: WideString; var Cancel: Smallint) of object;
  588.   TF1BookObjClick = procedure(Sender: TObject; var ObjName: WideString; ObjID: Integer) of object;
  589.   TF1BookObjDblClick = procedure(Sender: TObject; var ObjName: WideString; ObjID: Integer) of object;
  590.   TF1BookRClick = procedure(Sender: TObject; nRow, nCol: Integer) of object;
  591.   TF1BookRDblClick = procedure(Sender: TObject; nRow, nCol: Integer) of object;
  592.   TF1BookObjValueChanged = procedure(Sender: TObject; var ObjName: WideString; ObjID: Integer) of object;
  593.   TF1BookObjGotFocus = procedure(Sender: TObject; var ObjName: WideString; ObjID: Integer) of object;
  594.   TF1BookObjLostFocus = procedure(Sender: TObject; var ObjName: WideString; ObjID: Integer) of object;
  595.   TF1BookValidationFailed = procedure(Sender: TObject; var pEntry: WideString; nSheet, nRow, nCol: Integer; var pShowMessage: WideString; var pAction: Smallint) of object;
  596.  
  597.   TF1Book = class(TOleControl)
  598.   private
  599.     FOnClick: TF1BookClick;
  600.     FOnDblClick: TF1BookDblClick;
  601.     FOnCancelEdit: TNotifyEvent;
  602.     FOnSelChange: TNotifyEvent;
  603.     FOnStartEdit: TF1BookStartEdit;
  604.     FOnEndEdit: TF1BookEndEdit;
  605.     FOnStartRecalc: TNotifyEvent;
  606.     FOnEndRecalc: TNotifyEvent;
  607.     FOnTopLeftChanged: TNotifyEvent;
  608.     FOnObjClick: TF1BookObjClick;
  609.     FOnObjDblClick: TF1BookObjDblClick;
  610.     FOnRClick: TF1BookRClick;
  611.     FOnRDblClick: TF1BookRDblClick;
  612.     FOnObjValueChanged: TF1BookObjValueChanged;
  613.     FOnModified: TNotifyEvent;
  614.     FOnObjGotFocus: TF1BookObjGotFocus;
  615.     FOnObjLostFocus: TF1BookObjLostFocus;
  616.     FOnValidationFailed: TF1BookValidationFailed;
  617.     FIntf: _DVCF1;
  618.     function Get_PrintDevMode: OLE_HANDLE;
  619.     procedure Set_PrintDevMode(var Value: OLE_HANDLE);
  620.     function Get_hWnd: OLE_HANDLE;
  621.     procedure Set_hWnd(var Value: OLE_HANDLE);
  622.     function Get_ColText(nCol: Integer): WideString;
  623.     procedure Set_ColText(nCol: Integer; const Value: WideString);
  624.     function Get_DefinedName(const pName: WideString): WideString;
  625.     procedure Set_DefinedName(const pName: WideString; const Value: WideString);
  626.     function Get_EntryRC(nRow, nCol: Integer): WideString;
  627.     procedure Set_EntryRC(nRow, nCol: Integer; const Value: WideString);
  628.     function Get_FormattedTextRC(nRow, nCol: Integer): WideString;
  629.     procedure Set_FormattedTextRC(nRow, nCol: Integer; const Value: WideString);
  630.     function Get_FormulaRC(nRow, nCol: Integer): WideString;
  631.     procedure Set_FormulaRC(nRow, nCol: Integer; const Value: WideString);
  632.     function Get_LastColForRow(nRow: Integer): Integer;
  633.     procedure Set_LastColForRow(nRow: Integer; Value: Integer);
  634.     function Get_LogicalRC(nRow, nCol: Integer): WordBool;
  635.     procedure Set_LogicalRC(nRow, nCol: Integer; Value: WordBool);
  636.     function Get_NumberRC(nRow, nCol: Integer): Double;
  637.     procedure Set_NumberRC(nRow, nCol: Integer; Value: Double);
  638.     function Get_RowText(nRow: Integer): WideString;
  639.     procedure Set_RowText(nRow: Integer; const Value: WideString);
  640.     function Get_TextRC(nRow, nCol: Integer): WideString;
  641.     procedure Set_TextRC(nRow, nCol: Integer; const Value: WideString);
  642.     function Get_TypeRC(nRow, nCol: Integer): Smallint;
  643.     procedure Set_TypeRC(nRow, nCol: Integer; Value: Smallint);
  644.     function Get_ColWidth(nCol: Integer): Smallint;
  645.     procedure Set_ColWidth(nCol: Integer; Value: Smallint);
  646.     function Get_RowHeight(nRow: Integer): Smallint;
  647.     procedure Set_RowHeight(nRow: Integer; Value: Smallint);
  648.     function Get_DefinedNameByIndex(nName: Integer): WideString;
  649.     procedure Set_DefinedNameByIndex(nName: Integer; const Value: WideString);
  650.     function Get_SheetName(nSheet: Integer): WideString;
  651.     procedure Set_SheetName(nSheet: Integer; const Value: WideString);
  652.     function Get_PaletteEntry(nEntry: Integer): TColor;
  653.     procedure Set_PaletteEntry(nEntry: Integer; Value: TColor);
  654.     function Get_ColWidthTwips(Col: Integer): Smallint;
  655.     procedure Set_ColWidthTwips(Col: Integer; Value: Smallint);
  656.     function Get_ObjItem(ID: Integer; Item: Smallint): WideString;
  657.     procedure Set_ObjItem(ID: Integer; Item: Smallint; const Value: WideString);
  658.     function Get_ObjItems(ID: Integer): WideString;
  659.     procedure Set_ObjItems(ID: Integer; const Value: WideString);
  660.     function Get_ObjName(ID: Integer): WideString;
  661.     procedure Set_ObjName(ID: Integer; const Value: WideString);
  662.     function Get_ObjText(ID: Integer): WideString;
  663.     procedure Set_ObjText(ID: Integer; const Value: WideString);
  664.     function Get_ObjValue(ID: Integer): Smallint;
  665.     procedure Set_ObjValue(ID: Integer; Value: Smallint);
  666.     function Get_ObjVisible(ID: Integer): WordBool;
  667.     procedure Set_ObjVisible(ID: Integer; Value: WordBool);
  668.     function Get_AutoFillItems(Index: Smallint): WideString;
  669.     procedure Set_AutoFillItems(Index: Smallint; const Value: WideString);
  670.     function Get_ColHidden(nCol: Integer): WordBool;
  671.     procedure Set_ColHidden(nCol: Integer; Value: WordBool);
  672.     function Get_RowHidden(nRow: Integer): WordBool;
  673.     procedure Set_RowHidden(nRow: Integer; Value: WordBool);
  674.     function Get_SheetSelected(nSheet: Integer): WordBool;
  675.     procedure Set_SheetSelected(nSheet: Integer; Value: WordBool);
  676.   protected
  677.     procedure InitControlData; override;
  678.     procedure InitControlInterface(const Obj: IUnknown); override;
  679.   public
  680.     procedure EditPasteValues;
  681.     procedure GetAlignment(var pHorizontal: Smallint; var pWordWrap: WordBool; var pVertical, pOrientation: Smallint);
  682.     procedure GetBorder(var pLeft, pRight, pTop, pBottom, pShade: Smallint; var pcrLeft, pcrRight, pcrTop, pcrBottom: TColor);
  683.     procedure GetFont(var pName: WideString; var pSize: Smallint; var pBold, pItalic, pUnderline, pStrikeout: WordBool; var pcrColor: TColor; var pOutline, pShadow: WordBool);
  684.     procedure GetLineStyle(var pStyle: Smallint; var pcrColor: TColor; var pWeight: Smallint);
  685.     procedure GetPattern(var pPattern: Smallint; var pcrFG, pcrBG: TColor);
  686.     procedure GetProtection(var pLocked, pHidden: WordBool);
  687.     procedure GetTabbedText(nR1, nC1, nR2, nC2: Integer; bValuesOnly: WordBool; var phText: OLE_HANDLE);
  688.     procedure SetTabbedText(nStartRow, nStartCol: Integer; var pRows, pCols: Integer; bValuesOnly: WordBool; const pText: WideString);
  689.     procedure AddColPageBreak(nCol: Integer);
  690.     procedure AddPageBreak;
  691.     procedure AddRowPageBreak(nRow: Integer);
  692.     procedure AddSelection(nR1, nC1, nR2, nC2: Integer);
  693.     procedure Attach(const pTitle: WideString);
  694.     procedure AttachToSS(hSrcSS: Integer);
  695.     procedure CalculationDlg;
  696.     procedure CancelEdit;
  697.     procedure CheckRecalc;
  698.     procedure ClearClipboard;
  699.     procedure ClearRange(nR1, nC1, nR2, nC2: Integer; ClearType: Smallint);
  700.     procedure ColorPaletteDlg;
  701.     procedure ColWidthDlg;
  702.     procedure CopyAll(hSrcSS: Integer);
  703.     procedure CopyRange(nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcR1, nSrcC1, nSrcR2, nSrcC2: Integer);
  704.     procedure DefinedNameDlg;
  705.     procedure DeleteDefinedName(const pName: WideString);
  706.     procedure DeleteRange(nR1, nC1, nR2, nC2: Integer; ShiftType: Smallint);
  707.     procedure Draw(hDC: OLE_HANDLE; x, y, cx, cy, nRow, nCol: Integer; var pRows, pCols: Integer; nFixedRow, nFixedCol, nFixedRows, nFixedCols: Integer);
  708.     procedure EditClear(ClearType: Smallint);
  709.     procedure EditCopy;
  710.     procedure EditCopyDown;
  711.     procedure EditCopyRight;
  712.     procedure EditCut;
  713.     procedure EditDelete(ShiftType: Smallint);
  714.     procedure EditInsert(ShiftType: Smallint);
  715.     procedure EditPaste;
  716.     procedure EndEdit;
  717.     procedure FilePageSetupDlg;
  718.     procedure FilePrint(bShowPrintDlg: WordBool);
  719.     procedure FilePrintSetupDlg;
  720.     procedure FormatAlignmentDlg;
  721.     procedure FormatBorderDlg;
  722.     procedure FormatCurrency0;
  723.     procedure FormatCurrency2;
  724.     procedure FormatDefaultFontDlg;
  725.     procedure FormatFixed;
  726.     procedure FormatFixed2;
  727.     procedure FormatFontDlg;
  728.     procedure FormatFraction;
  729.     procedure FormatGeneral;
  730.     procedure FormatHmmampm;
  731.     procedure FormatMdyy;
  732.     procedure FormatNumberDlg;
  733.     procedure FormatPatternDlg;
  734.     procedure FormatPercent;
  735.     procedure FormatScientific;
  736.     procedure GetActiveCell(var pRow, pCol: Integer);
  737.     procedure GetDefaultFont(var pBuf: WideString; var pSize: Smallint);
  738.     procedure GetHdrSelection(var pTopLeftHdr, pRowHdr, pColHdr: WordBool);
  739.     procedure GetIteration(var pIteration: WordBool; var pMaxIterations: Smallint; var pMaxChange: Double);
  740.     procedure GetPrintScale(var pScale: Smallint; var pFitToPage: WordBool; var pVPages, pHPages: Integer);
  741.     procedure GetSelection(nSelection: Smallint; var pR1, pC1, pR2, pC2: Integer);
  742.     procedure GotoDlg;
  743.     procedure HeapMin;
  744.     procedure InitTable;
  745.     procedure InsertRange(nR1, nC1, nR2, nC2: Integer; ShiftType: Smallint);
  746.     procedure LineStyleDlg;
  747.     procedure MoveRange(nR1, nC1, nR2, nC2, nRowOffset, nColOffset: Integer);
  748.     procedure ObjAddItem(ID: Integer; const pItem: WideString);
  749.     procedure ObjAddSelection(ID: Integer);
  750.     procedure ObjBringToFront;
  751.     procedure ObjDeleteItem(ID: Integer; nItem: Smallint);
  752.     procedure ObjGetCell(ID: Integer; var pControlCellType: Smallint; var pRow, pCol: Integer);
  753.     procedure ObjGetPos(ID: Integer; var pX1, pY1, pX2, pY2: Single);
  754.     procedure ObjGetSelection(nSelection: Smallint; var pID: Integer);
  755.     procedure ObjInsertItem(ID: Integer; nItem: Smallint; const pItem: WideString);
  756.     procedure ObjNameDlg;
  757.     procedure ObjNew(ObjType: Smallint; nX1, nY1, nX2, nY2: Single; var pID: Integer);
  758.     procedure ObjNewPicture(nX1, nY1, nX2, nY2: Single; var pID: Integer; hMF: OLE_HANDLE; nMapMode, nWndExtentX, nWndExtentY: Integer);
  759.     procedure ObjOptionsDlg;
  760.     procedure ObjPosToTwips(nX1, nY1, nX2, nY2: Single; var pX, pY, pCX, pCY: Integer; var pShown: Smallint);
  761.     procedure ObjSendToBack;
  762.     procedure ObjSetCell(ID: Integer; ControlCellType: Smallint; nRow, nCol: Integer);
  763.     procedure ObjSetPicture(ID: Integer; hMF: OLE_HANDLE; nMapMode: Smallint; nWndExtentX, nWndExtentY: Integer);
  764.     procedure ObjSetPos(ID: Integer; nX1, nY1, nX2, nY2: Single);
  765.     procedure ObjSetSelection(ID: Integer);
  766.     procedure OpenFileDlg(const pTitle: WideString; hWndParent: OLE_HANDLE; var pBuf: WideString);
  767.     procedure ProtectionDlg;
  768.     procedure RangeToTwips(nRow1, nCol1, nRow2, nCol2: Integer; var pX, pY, pCX, pCY: Integer; var pShown: Smallint);
  769.     procedure Read(const pPathName: WideString; var pFileType: Smallint);
  770.     procedure ReadFromBlob(hBlob: OLE_HANDLE; nReservedBytes: Smallint);
  771.     procedure Recalc;
  772.     procedure RemoveColPageBreak(nCol: Integer);
  773.     procedure RemovePageBreak;
  774.     procedure RemoveRowPageBreak(nRow: Integer);
  775.     procedure RowHeightDlg;
  776.     procedure SaveFileDlg(const pTitle: WideString; var pBuf: WideString; var pFileType: Smallint);
  777.     procedure SaveWindowInfo;
  778.     procedure SetActiveCell(nRow, nCol: Integer);
  779.     procedure SetAlignment(HAlign: Smallint; bWordWrap: WordBool; VAlign, nOrientation: Smallint);
  780.     procedure SetBorder(nOutline, nLeft, nRight, nTop, nBottom, nShade: Smallint; crOutline, crLeft, crRight, crTop, crBottom: TColor);
  781.     procedure SetColWidth(nC1, nC2: Integer; nWidth: Smallint; bDefColWidth: WordBool);
  782.     procedure SetColWidthAuto(nR1, nC1, nR2, nC2: Integer; bSetDefaults: WordBool);
  783.     procedure SetDefaultFont(const pName: WideString; nSize: Smallint);
  784.     procedure SetFont(const pName: WideString; nSize: Smallint; bBold, bItalic, bUnderline, bStrikeout: WordBool; crColor: TColor; bOutline, bShadow: WordBool);
  785.     procedure SetHdrSelection(bTopLeftHdr, bRowHdr, bColHdr: WordBool);
  786.     procedure SetIteration(bIteration: WordBool; nMaxIterations: Smallint; nMaxChange: Double);
  787.     procedure SetLineStyle(nStyle: Smallint; crColor: TColor; nWeight: Smallint);
  788.     procedure SetPattern(nPattern: Smallint; crFG, crBG: TColor);
  789.     procedure SetPrintAreaFromSelection;
  790.     procedure SetPrintScale(nScale: Smallint; bFitToPage: WordBool; nVPages, nHPages: Smallint);
  791.     procedure SetPrintTitlesFromSelection;
  792.     procedure SetProtection(bLocked, bHidden: WordBool);
  793.     procedure SetRowHeight(nR1, nR2: Integer; nHeight: Smallint; bDefRowHeight: WordBool);
  794.     procedure SetRowHeightAuto(nR1, nC1, nR2, nC2: Integer; bSetDefaults: WordBool);
  795.     procedure SetSelection(nR1, nC1, nR2, nC2: Integer);
  796.     procedure ShowActiveCell;
  797.     procedure Sort3(nR1, nC1, nR2, nC2: Integer; bSortByRows: WordBool; nKey1, nKey2, nKey3: Integer);
  798.     procedure SortDlg;
  799.     procedure StartEdit(bClear, bInCellEditFocus, bArrowsExitEditMode: WordBool);
  800.     procedure SwapTables(hSS2: Integer);
  801.     procedure TransactCommit;
  802.     procedure TransactRollback;
  803.     procedure TransactStart;
  804.     procedure TwipsToRC(x, y: Integer; var pRow, pCol: Integer);
  805.     procedure SSUpdate;
  806.     function SSVersion: Smallint;
  807.     procedure Write(const pPathName: WideString; FileType: Smallint);
  808.     procedure WriteToBlob(var phBlob: OLE_HANDLE; nReservedBytes: Smallint);
  809.     procedure SetRowHidden(nRow1, nRow2: Integer; bHidden: WordBool);
  810.     procedure SetColHidden(nCol1, nCol2: Integer; bHidden: WordBool);
  811.     procedure SetColWidthTwips(nCol1, nCol2, nWidth: Integer; bDefColWidth: WordBool);
  812.     procedure EditInsertSheets;
  813.     procedure EditDeleteSheets;
  814.     procedure InsertSheets(nSheet, nSheets: Integer);
  815.     procedure DeleteSheets(nSheet, nSheets: Integer);
  816.     procedure Refresh;
  817.     function NextColPageBreak(Col: Integer): Integer;
  818.     function NextRowPageBreak(Row: Integer): Integer;
  819.     function ObjFirstID: Integer;
  820.     function ObjNextID(ID: Integer): Integer;
  821.     function ObjGetItemCount(ID: Integer): Smallint;
  822.     function ObjGetType(ID: Integer): Smallint;
  823.     function ObjGetSelectionCount: Smallint;
  824.     function FormatRCNr(Row, Col: Integer; DoAbsolute: WordBool): WideString;
  825.     function SS: Integer;
  826.     function ErrorNumberToText(SSError: Integer): WideString;
  827.     function ObjNameToID(const Name: WideString): Integer;
  828.     function DefinedNameCount: Integer;
  829.     procedure ValidationRuleDlg;
  830.     procedure SetValidationRule(const Rule, Text: WideString);
  831.     procedure GetValidationRule(var Rule, Text: WideString);
  832.     function AutoFillItemsCount: Smallint;
  833.     procedure CopyRangeEx(nDstSheet, nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcSheet, nSrcR1, nSrcC1, nSrcR2, nSrcC2: Integer);
  834.     procedure Sort(nR1, nC1, nR2, nC2: Integer; bSortByRows: WordBool; Keys: OleVariant);
  835.     procedure DeleteAutoFillItems(nIndex: Smallint);
  836.     procedure ODBCConnect(var pConnect: WideString; bShowErrors: WordBool; var pRetCode: Smallint);
  837.     procedure ODBCDisconnect;
  838.     procedure ODBCQuery(var pQuery: WideString; nRow, nCol: Integer; bForceShowDlg: WordBool; var pSetColNames, pSetColFormats, pSetColWidths, pSetMaxRC: WordBool; var pRetCode: Smallint);
  839.     procedure LaunchDesigner;
  840.     procedure AboutBox;
  841.     property ControlInterface: _DVCF1 read FIntf;
  842.     property ColText[nCol: Integer]: WideString read Get_ColText write Set_ColText;
  843.     property DefinedName[const pName: WideString]: WideString read Get_DefinedName write Set_DefinedName;
  844.     property EntryRC[nRow, nCol: Integer]: WideString read Get_EntryRC write Set_EntryRC;
  845.     property FormattedTextRC[nRow, nCol: Integer]: WideString read Get_FormattedTextRC write Set_FormattedTextRC;
  846.     property FormulaRC[nRow, nCol: Integer]: WideString read Get_FormulaRC write Set_FormulaRC;
  847.     property LastColForRow[nRow: Integer]: Integer read Get_LastColForRow write Set_LastColForRow;
  848.     property LogicalRC[nRow, nCol: Integer]: WordBool read Get_LogicalRC write Set_LogicalRC;
  849.     property NumberRC[nRow, nCol: Integer]: Double read Get_NumberRC write Set_NumberRC;
  850.     property RowText[nRow: Integer]: WideString read Get_RowText write Set_RowText;
  851.     property TextRC[nRow, nCol: Integer]: WideString read Get_TextRC write Set_TextRC;
  852.     property TypeRC[nRow, nCol: Integer]: Smallint read Get_TypeRC write Set_TypeRC;
  853.     property ColWidth[nCol: Integer]: Smallint read Get_ColWidth write Set_ColWidth;
  854.     property RowHeight[nRow: Integer]: Smallint read Get_RowHeight write Set_RowHeight;
  855.     property DefinedNameByIndex[nName: Integer]: WideString read Get_DefinedNameByIndex write Set_DefinedNameByIndex;
  856.     property SheetName[nSheet: Integer]: WideString read Get_SheetName write Set_SheetName;
  857.     property PaletteEntry[nEntry: Integer]: TColor read Get_PaletteEntry write Set_PaletteEntry;
  858.     property ColWidthTwips[Col: Integer]: Smallint read Get_ColWidthTwips write Set_ColWidthTwips;
  859.     property ObjItem[ID: Integer; Item: Smallint]: WideString read Get_ObjItem write Set_ObjItem;
  860.     property ObjItems[ID: Integer]: WideString read Get_ObjItems write Set_ObjItems;
  861.     property ObjName[ID: Integer]: WideString read Get_ObjName write Set_ObjName;
  862.     property ObjText[ID: Integer]: WideString read Get_ObjText write Set_ObjText;
  863.     property ObjValue[ID: Integer]: Smallint read Get_ObjValue write Set_ObjValue;
  864.     property ObjVisible[ID: Integer]: WordBool read Get_ObjVisible write Set_ObjVisible;
  865.     property AutoFillItems[Index: Smallint]: WideString read Get_AutoFillItems write Set_AutoFillItems;
  866.     property ColHidden[nCol: Integer]: WordBool read Get_ColHidden write Set_ColHidden;
  867.     property RowHidden[nRow: Integer]: WordBool read Get_RowHidden write Set_RowHidden;
  868.     property SheetSelected[nSheet: Integer]: WordBool read Get_SheetSelected write Set_SheetSelected;
  869.   published
  870.     property TabStop;
  871.     property Align;
  872.     property DragCursor;
  873.     property DragMode;
  874.     property ParentShowHint;
  875.     property PopupMenu;
  876.     property ShowHint;
  877.     property TabOrder;
  878.     property Visible;
  879.     property OnDragDrop;
  880.     property OnDragOver;
  881.     property OnEndDrag;
  882.     property OnEnter;
  883.     property OnExit;
  884.     property OnStartDrag;
  885.     property OnMouseUp;
  886.     property OnMouseMove;
  887.     property OnMouseDown;
  888.     property OnKeyUp;
  889.     property OnKeyPress;
  890.     property OnKeyDown;
  891.     property BackColor: TColor index 3 read GetTColorProp write SetTColorProp stored False;
  892.     property Col: Integer index 4 read GetIntegerProp write SetIntegerProp stored False;
  893.     property Row: Integer index 5 read GetIntegerProp write SetIntegerProp stored False;
  894.     property ShowHScrollBar: Smallint index 6 read GetSmallintProp write SetSmallintProp stored False;
  895.     property Text: WideString index 7 read GetWideStringProp write SetWideStringProp stored False;
  896.     property Number: Double index 8 read GetDoubleProp write SetDoubleProp stored False;
  897.     property Formula: WideString index 9 read GetWideStringProp write SetWideStringProp stored False;
  898.     property FixedCol: Integer index 10 read GetIntegerProp write SetIntegerProp stored False;
  899.     property FixedCols: Integer index 11 read GetIntegerProp write SetIntegerProp stored False;
  900.     property FixedRow: Integer index 12 read GetIntegerProp write SetIntegerProp stored False;
  901.     property FixedRows: Integer index 13 read GetIntegerProp write SetIntegerProp stored False;
  902.     property ShowGridLines: WordBool index 14 read GetWordBoolProp write SetWordBoolProp stored False;
  903.     property ShowRowHeading: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False;
  904.     property ShowSelections: Smallint index 16 read GetSmallintProp write SetSmallintProp stored False;
  905.     property LeftCol: Integer index 17 read GetIntegerProp write SetIntegerProp stored False;
  906.     property MaxCol: Integer index 18 read GetIntegerProp write SetIntegerProp stored False;
  907.     property MaxRow: Integer index 19 read GetIntegerProp write SetIntegerProp stored False;
  908.     property TopRow: Integer index 20 read GetIntegerProp write SetIntegerProp stored False;
  909.     property AllowResize: WordBool index 21 read GetWordBoolProp write SetWordBoolProp stored False;
  910.     property AllowSelections: WordBool index 22 read GetWordBoolProp write SetWordBoolProp stored False;
  911.     property AllowFormulas: WordBool index 23 read GetWordBoolProp write SetWordBoolProp stored False;
  912.     property AllowInCellEditing: WordBool index 24 read GetWordBoolProp write SetWordBoolProp stored False;
  913.     property ShowVScrollBar: Smallint index 25 read GetSmallintProp write SetSmallintProp stored False;
  914.     property AllowFillRange: WordBool index 26 read GetWordBoolProp write SetWordBoolProp stored False;
  915.     property AllowMoveRange: WordBool index 27 read GetWordBoolProp write SetWordBoolProp stored False;
  916.     property SelStartCol: Integer index 28 read GetIntegerProp write SetIntegerProp stored False;
  917.     property SelStartRow: Integer index 29 read GetIntegerProp write SetIntegerProp stored False;
  918.     property SelEndCol: Integer index 30 read GetIntegerProp write SetIntegerProp stored False;
  919.     property SelEndRow: Integer index 31 read GetIntegerProp write SetIntegerProp stored False;
  920.     property ExtraColor: TColor index 32 read GetTColorProp write SetTColorProp stored False;
  921.     property FileName: WideString index 33 read GetWideStringProp write SetWideStringProp stored False;
  922.     property AutoRecalc: WordBool index 34 read GetWordBoolProp write SetWordBoolProp stored False;
  923.     property PrintGridLines: WordBool index 35 read GetWordBoolProp write SetWordBoolProp stored False;
  924.     property PrintRowHeading: WordBool index 36 read GetWordBoolProp write SetWordBoolProp stored False;
  925.     property PrintHCenter: WordBool index 37 read GetWordBoolProp write SetWordBoolProp stored False;
  926.     property PrintVCenter: WordBool index 38 read GetWordBoolProp write SetWordBoolProp stored False;
  927.     property PrintLeftToRight: WordBool index 39 read GetWordBoolProp write SetWordBoolProp stored False;
  928.     property PrintHeader: WideString index 40 read GetWideStringProp write SetWideStringProp stored False;
  929.     property PrintFooter: WideString index 41 read GetWideStringProp write SetWideStringProp stored False;
  930.     property PrintLeftMargin: Double index 42 read GetDoubleProp write SetDoubleProp stored False;
  931.     property PrintTopMargin: Double index 43 read GetDoubleProp write SetDoubleProp stored False;
  932.     property PrintRightMargin: Double index 44 read GetDoubleProp write SetDoubleProp stored False;
  933.     property PrintBottomMargin: Double index 45 read GetDoubleProp write SetDoubleProp stored False;
  934.     property PrintArea: WideString index 46 read GetWideStringProp write SetWideStringProp stored False;
  935.     property PrintTitles: WideString index 47 read GetWideStringProp write SetWideStringProp stored False;
  936.     property PrintNoColor: WordBool index 48 read GetWordBoolProp write SetWordBoolProp stored False;
  937.     property Selection: WideString index 49 read GetWideStringProp write SetWideStringProp stored False;
  938.     property TableName: WideString index 50 read GetWideStringProp write SetWideStringProp stored False;
  939.     property DoCancelEdit: WordBool index 51 read GetWordBoolProp write SetWordBoolProp stored False;
  940.     property DoSelChange: WordBool index 52 read GetWordBoolProp write SetWordBoolProp stored False;
  941.     property DoStartEdit: WordBool index 53 read GetWordBoolProp write SetWordBoolProp stored False;
  942.     property DoEndEdit: WordBool index 54 read GetWordBoolProp write SetWordBoolProp stored False;
  943.     property DoStartRecalc: WordBool index 55 read GetWordBoolProp write SetWordBoolProp stored False;
  944.     property DoEndRecalc: WordBool index 56 read GetWordBoolProp write SetWordBoolProp stored False;
  945.     property DoClick: WordBool index 57 read GetWordBoolProp write SetWordBoolProp stored False;
  946.     property DoDblClick: WordBool index 58 read GetWordBoolProp write SetWordBoolProp stored False;
  947.     property ShowColHeading: WordBool index 59 read GetWordBoolProp write SetWordBoolProp stored False;
  948.     property PrintColHeading: WordBool index 60 read GetWordBoolProp write SetWordBoolProp stored False;
  949.     property Entry: WideString index 61 read GetWideStringProp write SetWideStringProp stored False;
  950.     property Repaint: WordBool index 62 read GetWordBoolProp write SetWordBoolProp stored False;
  951.     property AllowArrows: WordBool index 63 read GetWordBoolProp write SetWordBoolProp stored False;
  952.     property AllowTabs: WordBool index 64 read GetWordBoolProp write SetWordBoolProp stored False;
  953.     property FormattedText: WideString index 65 read GetWideStringProp write SetWideStringProp stored False;
  954.     property RowMode: WordBool index 66 read GetWordBoolProp write SetWordBoolProp stored False;
  955.     property AllowDelete: WordBool index 67 read GetWordBoolProp write SetWordBoolProp stored False;
  956.     property EnableProtection: WordBool index 68 read GetWordBoolProp write SetWordBoolProp stored False;
  957.     property MinCol: Integer index 69 read GetIntegerProp write SetIntegerProp stored False;
  958.     property MinRow: Integer index 70 read GetIntegerProp write SetIntegerProp stored False;
  959.     property DoTopLeftChanged: WordBool index 71 read GetWordBoolProp write SetWordBoolProp stored False;
  960.     property AllowEditHeaders: WordBool index 72 read GetWordBoolProp write SetWordBoolProp stored False;
  961.     property DoObjClick: WordBool index 73 read GetWordBoolProp write SetWordBoolProp stored False;
  962.     property DoObjDblClick: WordBool index 74 read GetWordBoolProp write SetWordBoolProp stored False;
  963.     property AllowObjSelections: WordBool index 75 read GetWordBoolProp write SetWordBoolProp stored False;
  964.     property DoRClick: WordBool index 76 read GetWordBoolProp write SetWordBoolProp stored False;
  965.     property DoRDblClick: WordBool index 77 read GetWordBoolProp write SetWordBoolProp stored False;
  966.     property Clip: WideString index 78 read GetWideStringProp write SetWideStringProp stored False;
  967.     property ClipValues: WideString index 79 read GetWideStringProp write SetWideStringProp stored False;
  968.     property PrintLandscape: WordBool index 80 read GetWordBoolProp write SetWordBoolProp stored False;
  969.     property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp stored False;
  970.     property BorderStyle: Smallint index -504 read GetSmallintProp write SetSmallintProp stored False;
  971.     property AppName: WideString index 81 read GetWideStringProp write SetWideStringProp stored False;
  972.     property HdrHeight: Smallint index 82 read GetSmallintProp write SetSmallintProp stored False;
  973.     property HdrWidth: Smallint index 83 read GetSmallintProp write SetSmallintProp stored False;
  974.     property NumberFormat: WideString index 84 read GetWideStringProp write SetWideStringProp stored False;
  975.     property TopLeftText: WideString index 85 read GetWideStringProp write SetWideStringProp stored False;
  976.     property EnterMovesDown: WordBool index 86 read GetWordBoolProp write SetWordBoolProp stored False;
  977.     property LastCol: Integer index 87 read GetIntegerProp write SetIntegerProp stored False;
  978.     property LastRow: Integer index 88 read GetIntegerProp write SetIntegerProp stored False;
  979.     property Logical: WordBool index 89 read GetWordBoolProp write SetWordBoolProp stored False;
  980.     property Mode: Smallint index 90 read GetSmallintProp write SetSmallintProp stored False;
  981.     property PolyEditMode: Smallint index 91 read GetSmallintProp write SetSmallintProp stored False;
  982.     property ViewScale: Smallint index 92 read GetSmallintProp write SetSmallintProp stored False;
  983.     property SelectionCount: Smallint index 93 read GetSmallintProp write SetSmallintProp stored False;
  984.     property Title: WideString index 94 read GetWideStringProp write SetWideStringProp stored False;
  985.     property Type_: Smallint index 95 read GetSmallintProp write SetSmallintProp stored False;
  986.     property ShowFormulas: WordBool index 96 read GetWordBoolProp write SetWordBoolProp stored False;
  987.     property ShowZeroValues: WordBool index 97 read GetWordBoolProp write SetWordBoolProp stored False;
  988.     property MousePointer: Smallint index 2 read GetSmallintProp write SetSmallintProp stored False;
  989.     property MouseIcon: TPicture index 98 read GetTPictureProp write SetTPictureProp stored False;
  990.     property DoObjValueChanged: WordBool index 99 read GetWordBoolProp write SetWordBoolProp stored False;
  991.     property ScrollToLastRC: WordBool index 100 read GetWordBoolProp write SetWordBoolProp stored False;
  992.     property Modified: WordBool index 101 read GetWordBoolProp write SetWordBoolProp stored False;
  993.     property DoObjGotFocus: WordBool index 102 read GetWordBoolProp write SetWordBoolProp stored False;
  994.     property DoObjLostFocus: WordBool index 103 read GetWordBoolProp write SetWordBoolProp stored False;
  995.     property PrintDevMode: OLE_HANDLE read Get_PrintDevMode write Set_PrintDevMode stored False;
  996.     property NumSheets: Integer index 105 read GetIntegerProp write SetIntegerProp stored False;
  997.     property Sheet: Integer index 106 read GetIntegerProp write SetIntegerProp stored False;
  998.     property ColWidthUnits: Smallint index 107 read GetSmallintProp write SetSmallintProp stored False;
  999.     property ShowTypeMarkers: WordBool index 108 read GetWordBoolProp write SetWordBoolProp stored False;
  1000.     property ShowTabs: Smallint index 109 read GetSmallintProp write SetSmallintProp stored False;
  1001.     property ShowEditBar: WordBool index 110 read GetWordBoolProp write SetWordBoolProp stored False;
  1002.     property ShowEditBarCellRef: WordBool index 111 read GetWordBoolProp write SetWordBoolProp stored False;
  1003.     property AllowDesigner: WordBool index 1 read GetWordBoolProp write SetWordBoolProp stored False;
  1004.     property hWnd: OLE_HANDLE read Get_hWnd write Set_hWnd stored False;
  1005.     property AllowAutoFill: WordBool index 112 read GetWordBoolProp write SetWordBoolProp stored False;
  1006.     property OnClick: TF1BookClick read FOnClick write FOnClick;
  1007.     property OnDblClick: TF1BookDblClick read FOnDblClick write FOnDblClick;
  1008.     property OnCancelEdit: TNotifyEvent read FOnCancelEdit write FOnCancelEdit;
  1009.     property OnSelChange: TNotifyEvent read FOnSelChange write FOnSelChange;
  1010.     property OnStartEdit: TF1BookStartEdit read FOnStartEdit write FOnStartEdit;
  1011.     property OnEndEdit: TF1BookEndEdit read FOnEndEdit write FOnEndEdit;
  1012.     property OnStartRecalc: TNotifyEvent read FOnStartRecalc write FOnStartRecalc;
  1013.     property OnEndRecalc: TNotifyEvent read FOnEndRecalc write FOnEndRecalc;
  1014.     property OnTopLeftChanged: TNotifyEvent read FOnTopLeftChanged write FOnTopLeftChanged;
  1015.     property OnObjClick: TF1BookObjClick read FOnObjClick write FOnObjClick;
  1016.     property OnObjDblClick: TF1BookObjDblClick read FOnObjDblClick write FOnObjDblClick;
  1017.     property OnRClick: TF1BookRClick read FOnRClick write FOnRClick;
  1018.     property OnRDblClick: TF1BookRDblClick read FOnRDblClick write FOnRDblClick;
  1019.     property OnObjValueChanged: TF1BookObjValueChanged read FOnObjValueChanged write FOnObjValueChanged;
  1020.     property OnModified: TNotifyEvent read FOnModified write FOnModified;
  1021.     property OnObjGotFocus: TF1BookObjGotFocus read FOnObjGotFocus write FOnObjGotFocus;
  1022.     property OnObjLostFocus: TF1BookObjLostFocus read FOnObjLostFocus write FOnObjLostFocus;
  1023.     property OnValidationFailed: TF1BookValidationFailed read FOnValidationFailed write FOnValidationFailed;
  1024.   end;
  1025.  
  1026. procedure Register;
  1027.  
  1028. implementation
  1029.  
  1030. uses ComObj;
  1031.  
  1032. procedure TF1Book.InitControlData;
  1033. const
  1034.   CEventDispIDs: array[0..17] of Integer = (
  1035.     $00000001, $00000002, $00000003, $00000004, $00000005, $00000006,
  1036.     $00000007, $00000008, $00000009, $0000000A, $0000000B, $0000000C,
  1037.     $0000000D, $0000000E, $0000000F, $00000010, $00000011, $00000012);
  1038.   CLicenseKey: array[0..42] of Word = (
  1039.     $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020,
  1040.     $0028, $0063, $0029, $0020, $0031, $0039, $0039, $0035, $0020, $0056,
  1041.     $0069, $0073, $0075, $0061, $006C, $0020, $0043, $006F, $006D, $0070,
  1042.     $006F, $006E, $0065, $006E, $0074, $0073, $002C, $0020, $0049, $006E,
  1043.     $0063, $002E, $0000);
  1044.   CTPictureIDs: array [0..0] of Integer = (
  1045.     $00000062);
  1046.   CControlData: TControlData = (
  1047.     ClassID: '{042BADC5-5E58-11CE-B610-524153480001}';
  1048.     EventIID: '{042BADC7-5E58-11CE-B610-524153480001}';
  1049.     EventCount: 18;
  1050.     EventDispIDs: @CEventDispIDs;
  1051.     LicenseKey: @CLicenseKey;
  1052.     Flags: $00000008;
  1053.     Version: 300;
  1054.     FontCount: 0;
  1055.     FontIDs: nil;
  1056.     PictureCount: 1;
  1057.     PictureIDs: @CTPictureIDs);
  1058. begin
  1059.   ControlData := @CControlData;
  1060. end;
  1061.  
  1062. procedure TF1Book.InitControlInterface(const Obj: IUnknown);
  1063. begin
  1064.   FIntf := Obj as _DVCF1;
  1065. end;
  1066.  
  1067. procedure TF1Book.EditPasteValues;
  1068. begin
  1069.   ControlInterface.EditPasteValues;
  1070. end;
  1071.  
  1072. procedure TF1Book.GetAlignment(var pHorizontal: Smallint; var pWordWrap: WordBool; var pVertical, pOrientation: Smallint);
  1073. begin
  1074.   ControlInterface.GetAlignment(pHorizontal, pWordWrap, pVertical, pOrientation);
  1075. end;
  1076.  
  1077. procedure TF1Book.GetBorder(var pLeft, pRight, pTop, pBottom, pShade: Smallint; var pcrLeft, pcrRight, pcrTop, pcrBottom: TColor);
  1078. begin
  1079.   ControlInterface.GetBorder(pLeft, pRight, pTop, pBottom, pShade, pcrLeft, pcrRight, pcrTop, pcrBottom);
  1080. end;
  1081.  
  1082. procedure TF1Book.GetFont(var pName: WideString; var pSize: Smallint; var pBold, pItalic, pUnderline, pStrikeout: WordBool; var pcrColor: TColor; var pOutline, pShadow: WordBool);
  1083. begin
  1084.   ControlInterface.GetFont(pName, pSize, pBold, pItalic, pUnderline, pStrikeout, pcrColor, pOutline, pShadow);
  1085. end;
  1086.  
  1087. procedure TF1Book.GetLineStyle(var pStyle: Smallint; var pcrColor: TColor; var pWeight: Smallint);
  1088. begin
  1089.   ControlInterface.GetLineStyle(pStyle, pcrColor, pWeight);
  1090. end;
  1091.  
  1092. procedure TF1Book.GetPattern(var pPattern: Smallint; var pcrFG, pcrBG: TColor);
  1093. begin
  1094.   ControlInterface.GetPattern(pPattern, pcrFG, pcrBG);
  1095. end;
  1096.  
  1097. procedure TF1Book.GetProtection(var pLocked, pHidden: WordBool);
  1098. begin
  1099.   ControlInterface.GetProtection(pLocked, pHidden);
  1100. end;
  1101.  
  1102. procedure TF1Book.GetTabbedText(nR1, nC1, nR2, nC2: Integer; bValuesOnly: WordBool; var phText: OLE_HANDLE);
  1103. begin
  1104.   ControlInterface.GetTabbedText(nR1, nC1, nR2, nC2, bValuesOnly, phText);
  1105. end;
  1106.  
  1107. procedure TF1Book.SetTabbedText(nStartRow, nStartCol: Integer; var pRows, pCols: Integer; bValuesOnly: WordBool; const pText: WideString);
  1108. begin
  1109.   ControlInterface.SetTabbedText(nStartRow, nStartCol, pRows, pCols, bValuesOnly, pText);
  1110. end;
  1111.  
  1112. procedure TF1Book.AddColPageBreak(nCol: Integer);
  1113. begin
  1114.   ControlInterface.AddColPageBreak(nCol);
  1115. end;
  1116.  
  1117. procedure TF1Book.AddPageBreak;
  1118. begin
  1119.   ControlInterface.AddPageBreak;
  1120. end;
  1121.  
  1122. procedure TF1Book.AddRowPageBreak(nRow: Integer);
  1123. begin
  1124.   ControlInterface.AddRowPageBreak(nRow);
  1125. end;
  1126.  
  1127. procedure TF1Book.AddSelection(nR1, nC1, nR2, nC2: Integer);
  1128. begin
  1129.   ControlInterface.AddSelection(nR1, nC1, nR2, nC2);
  1130. end;
  1131.  
  1132. procedure TF1Book.Attach(const pTitle: WideString);
  1133. begin
  1134.   ControlInterface.Attach(pTitle);
  1135. end;
  1136.  
  1137. procedure TF1Book.AttachToSS(hSrcSS: Integer);
  1138. begin
  1139.   ControlInterface.AttachToSS(hSrcSS);
  1140. end;
  1141.  
  1142. procedure TF1Book.CalculationDlg;
  1143. begin
  1144.   ControlInterface.CalculationDlg;
  1145. end;
  1146.  
  1147. procedure TF1Book.CancelEdit;
  1148. begin
  1149.   ControlInterface.CancelEdit;
  1150. end;
  1151.  
  1152. procedure TF1Book.CheckRecalc;
  1153. begin
  1154.   ControlInterface.CheckRecalc;
  1155. end;
  1156.  
  1157. procedure TF1Book.ClearClipboard;
  1158. begin
  1159.   ControlInterface.ClearClipboard;
  1160. end;
  1161.  
  1162. procedure TF1Book.ClearRange(nR1, nC1, nR2, nC2: Integer; ClearType: Smallint);
  1163. begin
  1164.   ControlInterface.ClearRange(nR1, nC1, nR2, nC2, ClearType);
  1165. end;
  1166.  
  1167. procedure TF1Book.ColorPaletteDlg;
  1168. begin
  1169.   ControlInterface.ColorPaletteDlg;
  1170. end;
  1171.  
  1172. procedure TF1Book.ColWidthDlg;
  1173. begin
  1174.   ControlInterface.ColWidthDlg;
  1175. end;
  1176.  
  1177. procedure TF1Book.CopyAll(hSrcSS: Integer);
  1178. begin
  1179.   ControlInterface.CopyAll(hSrcSS);
  1180. end;
  1181.  
  1182. procedure TF1Book.CopyRange(nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcR1, nSrcC1, nSrcR2, nSrcC2: Integer);
  1183. begin
  1184.   ControlInterface.CopyRange(nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcR1, nSrcC1, nSrcR2, nSrcC2);
  1185. end;
  1186.  
  1187. procedure TF1Book.DefinedNameDlg;
  1188. begin
  1189.   ControlInterface.DefinedNameDlg;
  1190. end;
  1191.  
  1192. procedure TF1Book.DeleteDefinedName(const pName: WideString);
  1193. begin
  1194.   ControlInterface.DeleteDefinedName(pName);
  1195. end;
  1196.  
  1197. procedure TF1Book.DeleteRange(nR1, nC1, nR2, nC2: Integer; ShiftType: Smallint);
  1198. begin
  1199.   ControlInterface.DeleteRange(nR1, nC1, nR2, nC2, ShiftType);
  1200. end;
  1201.  
  1202. procedure TF1Book.Draw(hDC: OLE_HANDLE; x, y, cx, cy, nRow, nCol: Integer; var pRows, pCols: Integer; nFixedRow, nFixedCol, nFixedRows, nFixedCols: Integer);
  1203. begin
  1204.   ControlInterface.Draw(hDC, x, y, cx, cy, nRow, nCol, pRows, pCols, nFixedRow, nFixedCol, nFixedRows, nFixedCols);
  1205. end;
  1206.  
  1207. procedure TF1Book.EditClear(ClearType: Smallint);
  1208. begin
  1209.   ControlInterface.EditClear(ClearType);
  1210. end;
  1211.  
  1212. procedure TF1Book.EditCopy;
  1213. begin
  1214.   ControlInterface.EditCopy;
  1215. end;
  1216.  
  1217. procedure TF1Book.EditCopyDown;
  1218. begin
  1219.   ControlInterface.EditCopyDown;
  1220. end;
  1221.  
  1222. procedure TF1Book.EditCopyRight;
  1223. begin
  1224.   ControlInterface.EditCopyRight;
  1225. end;
  1226.  
  1227. procedure TF1Book.EditCut;
  1228. begin
  1229.   ControlInterface.EditCut;
  1230. end;
  1231.  
  1232. procedure TF1Book.EditDelete(ShiftType: Smallint);
  1233. begin
  1234.   ControlInterface.EditDelete(ShiftType);
  1235. end;
  1236.  
  1237. procedure TF1Book.EditInsert(ShiftType: Smallint);
  1238. begin
  1239.   ControlInterface.EditInsert(ShiftType);
  1240. end;
  1241.  
  1242. procedure TF1Book.EditPaste;
  1243. begin
  1244.   ControlInterface.EditPaste;
  1245. end;
  1246.  
  1247. procedure TF1Book.EndEdit;
  1248. begin
  1249.   ControlInterface.EndEdit;
  1250. end;
  1251.  
  1252. procedure TF1Book.FilePageSetupDlg;
  1253. begin
  1254.   ControlInterface.FilePageSetupDlg;
  1255. end;
  1256.  
  1257. procedure TF1Book.FilePrint(bShowPrintDlg: WordBool);
  1258. begin
  1259.   ControlInterface.FilePrint(bShowPrintDlg);
  1260. end;
  1261.  
  1262. procedure TF1Book.FilePrintSetupDlg;
  1263. begin
  1264.   ControlInterface.FilePrintSetupDlg;
  1265. end;
  1266.  
  1267. procedure TF1Book.FormatAlignmentDlg;
  1268. begin
  1269.   ControlInterface.FormatAlignmentDlg;
  1270. end;
  1271.  
  1272. procedure TF1Book.FormatBorderDlg;
  1273. begin
  1274.   ControlInterface.FormatBorderDlg;
  1275. end;
  1276.  
  1277. procedure TF1Book.FormatCurrency0;
  1278. begin
  1279.   ControlInterface.FormatCurrency0;
  1280. end;
  1281.  
  1282. procedure TF1Book.FormatCurrency2;
  1283. begin
  1284.   ControlInterface.FormatCurrency2;
  1285. end;
  1286.  
  1287. procedure TF1Book.FormatDefaultFontDlg;
  1288. begin
  1289.   ControlInterface.FormatDefaultFontDlg;
  1290. end;
  1291.  
  1292. procedure TF1Book.FormatFixed;
  1293. begin
  1294.   ControlInterface.FormatFixed;
  1295. end;
  1296.  
  1297. procedure TF1Book.FormatFixed2;
  1298. begin
  1299.   ControlInterface.FormatFixed2;
  1300. end;
  1301.  
  1302. procedure TF1Book.FormatFontDlg;
  1303. begin
  1304.   ControlInterface.FormatFontDlg;
  1305. end;
  1306.  
  1307. procedure TF1Book.FormatFraction;
  1308. begin
  1309.   ControlInterface.FormatFraction;
  1310. end;
  1311.  
  1312. procedure TF1Book.FormatGeneral;
  1313. begin
  1314.   ControlInterface.FormatGeneral;
  1315. end;
  1316.  
  1317. procedure TF1Book.FormatHmmampm;
  1318. begin
  1319.   ControlInterface.FormatHmmampm;
  1320. end;
  1321.  
  1322. procedure TF1Book.FormatMdyy;
  1323. begin
  1324.   ControlInterface.FormatMdyy;
  1325. end;
  1326.  
  1327. procedure TF1Book.FormatNumberDlg;
  1328. begin
  1329.   ControlInterface.FormatNumberDlg;
  1330. end;
  1331.  
  1332. procedure TF1Book.FormatPatternDlg;
  1333. begin
  1334.   ControlInterface.FormatPatternDlg;
  1335. end;
  1336.  
  1337. procedure TF1Book.FormatPercent;
  1338. begin
  1339.   ControlInterface.FormatPercent;
  1340. end;
  1341.  
  1342. procedure TF1Book.FormatScientific;
  1343. begin
  1344.   ControlInterface.FormatScientific;
  1345. end;
  1346.  
  1347. procedure TF1Book.GetActiveCell(var pRow, pCol: Integer);
  1348. begin
  1349.   ControlInterface.GetActiveCell(pRow, pCol);
  1350. end;
  1351.  
  1352. procedure TF1Book.GetDefaultFont(var pBuf: WideString; var pSize: Smallint);
  1353. begin
  1354.   ControlInterface.GetDefaultFont(pBuf, pSize);
  1355. end;
  1356.  
  1357. procedure TF1Book.GetHdrSelection(var pTopLeftHdr, pRowHdr, pColHdr: WordBool);
  1358. begin
  1359.   ControlInterface.GetHdrSelection(pTopLeftHdr, pRowHdr, pColHdr);
  1360. end;
  1361.  
  1362. procedure TF1Book.GetIteration(var pIteration: WordBool; var pMaxIterations: Smallint; var pMaxChange: Double);
  1363. begin
  1364.   ControlInterface.GetIteration(pIteration, pMaxIterations, pMaxChange);
  1365. end;
  1366.  
  1367. procedure TF1Book.GetPrintScale(var pScale: Smallint; var pFitToPage: WordBool; var pVPages, pHPages: Integer);
  1368. begin
  1369.   ControlInterface.GetPrintScale(pScale, pFitToPage, pVPages, pHPages);
  1370. end;
  1371.  
  1372. procedure TF1Book.GetSelection(nSelection: Smallint; var pR1, pC1, pR2, pC2: Integer);
  1373. begin
  1374.   ControlInterface.GetSelection(nSelection, pR1, pC1, pR2, pC2);
  1375. end;
  1376.  
  1377. procedure TF1Book.GotoDlg;
  1378. begin
  1379.   ControlInterface.GotoDlg;
  1380. end;
  1381.  
  1382. procedure TF1Book.HeapMin;
  1383. begin
  1384.   ControlInterface.HeapMin;
  1385. end;
  1386.  
  1387. procedure TF1Book.InitTable;
  1388. begin
  1389.   ControlInterface.InitTable;
  1390. end;
  1391.  
  1392. procedure TF1Book.InsertRange(nR1, nC1, nR2, nC2: Integer; ShiftType: Smallint);
  1393. begin
  1394.   ControlInterface.InsertRange(nR1, nC1, nR2, nC2, ShiftType);
  1395. end;
  1396.  
  1397. procedure TF1Book.LineStyleDlg;
  1398. begin
  1399.   ControlInterface.LineStyleDlg;
  1400. end;
  1401.  
  1402. procedure TF1Book.MoveRange(nR1, nC1, nR2, nC2, nRowOffset, nColOffset: Integer);
  1403. begin
  1404.   ControlInterface.MoveRange(nR1, nC1, nR2, nC2, nRowOffset, nColOffset);
  1405. end;
  1406.  
  1407. procedure TF1Book.ObjAddItem(ID: Integer; const pItem: WideString);
  1408. begin
  1409.   ControlInterface.ObjAddItem(ID, pItem);
  1410. end;
  1411.  
  1412. procedure TF1Book.ObjAddSelection(ID: Integer);
  1413. begin
  1414.   ControlInterface.ObjAddSelection(ID);
  1415. end;
  1416.  
  1417. procedure TF1Book.ObjBringToFront;
  1418. begin
  1419.   ControlInterface.ObjBringToFront;
  1420. end;
  1421.  
  1422. procedure TF1Book.ObjDeleteItem(ID: Integer; nItem: Smallint);
  1423. begin
  1424.   ControlInterface.ObjDeleteItem(ID, nItem);
  1425. end;
  1426.  
  1427. procedure TF1Book.ObjGetCell(ID: Integer; var pControlCellType: Smallint; var pRow, pCol: Integer);
  1428. begin
  1429.   ControlInterface.ObjGetCell(ID, pControlCellType, pRow, pCol);
  1430. end;
  1431.  
  1432. procedure TF1Book.ObjGetPos(ID: Integer; var pX1, pY1, pX2, pY2: Single);
  1433. begin
  1434.   ControlInterface.ObjGetPos(ID, pX1, pY1, pX2, pY2);
  1435. end;
  1436.  
  1437. procedure TF1Book.ObjGetSelection(nSelection: Smallint; var pID: Integer);
  1438. begin
  1439.   ControlInterface.ObjGetSelection(nSelection, pID);
  1440. end;
  1441.  
  1442. procedure TF1Book.ObjInsertItem(ID: Integer; nItem: Smallint; const pItem: WideString);
  1443. begin
  1444.   ControlInterface.ObjInsertItem(ID, nItem, pItem);
  1445. end;
  1446.  
  1447. procedure TF1Book.ObjNameDlg;
  1448. begin
  1449.   ControlInterface.ObjNameDlg;
  1450. end;
  1451.  
  1452. procedure TF1Book.ObjNew(ObjType: Smallint; nX1, nY1, nX2, nY2: Single; var pID: Integer);
  1453. begin
  1454.   ControlInterface.ObjNew(ObjType, nX1, nY1, nX2, nY2, pID);
  1455. end;
  1456.  
  1457. procedure TF1Book.ObjNewPicture(nX1, nY1, nX2, nY2: Single; var pID: Integer; hMF: OLE_HANDLE; nMapMode, nWndExtentX, nWndExtentY: Integer);
  1458. begin
  1459.   ControlInterface.ObjNewPicture(nX1, nY1, nX2, nY2, pID, hMF, nMapMode, nWndExtentX, nWndExtentY);
  1460. end;
  1461.  
  1462. procedure TF1Book.ObjOptionsDlg;
  1463. begin
  1464.   ControlInterface.ObjOptionsDlg;
  1465. end;
  1466.  
  1467. procedure TF1Book.ObjPosToTwips(nX1, nY1, nX2, nY2: Single; var pX, pY, pCX, pCY: Integer; var pShown: Smallint);
  1468. begin
  1469.   ControlInterface.ObjPosToTwips(nX1, nY1, nX2, nY2, pX, pY, pCX, pCY, pShown);
  1470. end;
  1471.  
  1472. procedure TF1Book.ObjSendToBack;
  1473. begin
  1474.   ControlInterface.ObjSendToBack;
  1475. end;
  1476.  
  1477. procedure TF1Book.ObjSetCell(ID: Integer; ControlCellType: Smallint; nRow, nCol: Integer);
  1478. begin
  1479.   ControlInterface.ObjSetCell(ID, ControlCellType, nRow, nCol);
  1480. end;
  1481.  
  1482. procedure TF1Book.ObjSetPicture(ID: Integer; hMF: OLE_HANDLE; nMapMode: Smallint; nWndExtentX, nWndExtentY: Integer);
  1483. begin
  1484.   ControlInterface.ObjSetPicture(ID, hMF, nMapMode, nWndExtentX, nWndExtentY);
  1485. end;
  1486.  
  1487. procedure TF1Book.ObjSetPos(ID: Integer; nX1, nY1, nX2, nY2: Single);
  1488. begin
  1489.   ControlInterface.ObjSetPos(ID, nX1, nY1, nX2, nY2);
  1490. end;
  1491.  
  1492. procedure TF1Book.ObjSetSelection(ID: Integer);
  1493. begin
  1494.   ControlInterface.ObjSetSelection(ID);
  1495. end;
  1496.  
  1497. procedure TF1Book.OpenFileDlg(const pTitle: WideString; hWndParent: OLE_HANDLE; var pBuf: WideString);
  1498. begin
  1499.   ControlInterface.OpenFileDlg(pTitle, hWndParent, pBuf);
  1500. end;
  1501.  
  1502. procedure TF1Book.ProtectionDlg;
  1503. begin
  1504.   ControlInterface.ProtectionDlg;
  1505. end;
  1506.  
  1507. procedure TF1Book.RangeToTwips(nRow1, nCol1, nRow2, nCol2: Integer; var pX, pY, pCX, pCY: Integer; var pShown: Smallint);
  1508. begin
  1509.   ControlInterface.RangeToTwips(nRow1, nCol1, nRow2, nCol2, pX, pY, pCX, pCY, pShown);
  1510. end;
  1511.  
  1512. procedure TF1Book.Read(const pPathName: WideString; var pFileType: Smallint);
  1513. begin
  1514.   ControlInterface.Read(pPathName, pFileType);
  1515. end;
  1516.  
  1517. procedure TF1Book.ReadFromBlob(hBlob: OLE_HANDLE; nReservedBytes: Smallint);
  1518. begin
  1519.   ControlInterface.ReadFromBlob(hBlob, nReservedBytes);
  1520. end;
  1521.  
  1522. procedure TF1Book.Recalc;
  1523. begin
  1524.   ControlInterface.Recalc;
  1525. end;
  1526.  
  1527. procedure TF1Book.RemoveColPageBreak(nCol: Integer);
  1528. begin
  1529.   ControlInterface.RemoveColPageBreak(nCol);
  1530. end;
  1531.  
  1532. procedure TF1Book.RemovePageBreak;
  1533. begin
  1534.   ControlInterface.RemovePageBreak;
  1535. end;
  1536.  
  1537. procedure TF1Book.RemoveRowPageBreak(nRow: Integer);
  1538. begin
  1539.   ControlInterface.RemoveRowPageBreak(nRow);
  1540. end;
  1541.  
  1542. procedure TF1Book.RowHeightDlg;
  1543. begin
  1544.   ControlInterface.RowHeightDlg;
  1545. end;
  1546.  
  1547. procedure TF1Book.SaveFileDlg(const pTitle: WideString; var pBuf: WideString; var pFileType: Smallint);
  1548. begin
  1549.   ControlInterface.SaveFileDlg(pTitle, pBuf, pFileType);
  1550. end;
  1551.  
  1552. procedure TF1Book.SaveWindowInfo;
  1553. begin
  1554.   ControlInterface.SaveWindowInfo;
  1555. end;
  1556.  
  1557. procedure TF1Book.SetActiveCell(nRow, nCol: Integer);
  1558. begin
  1559.   ControlInterface.SetActiveCell(nRow, nCol);
  1560. end;
  1561.  
  1562. procedure TF1Book.SetAlignment(HAlign: Smallint; bWordWrap: WordBool; VAlign, nOrientation: Smallint);
  1563. begin
  1564.   ControlInterface.SetAlignment(HAlign, bWordWrap, VAlign, nOrientation);
  1565. end;
  1566.  
  1567. procedure TF1Book.SetBorder(nOutline, nLeft, nRight, nTop, nBottom, nShade: Smallint; crOutline, crLeft, crRight, crTop, crBottom: TColor);
  1568. begin
  1569.   ControlInterface.SetBorder(nOutline, nLeft, nRight, nTop, nBottom, nShade, crOutline, crLeft, crRight, crTop, crBottom);
  1570. end;
  1571.  
  1572. procedure TF1Book.SetColWidth(nC1, nC2: Integer; nWidth: Smallint; bDefColWidth: WordBool);
  1573. begin
  1574.   ControlInterface.SetColWidth(nC1, nC2, nWidth, bDefColWidth);
  1575. end;
  1576.  
  1577. procedure TF1Book.SetColWidthAuto(nR1, nC1, nR2, nC2: Integer; bSetDefaults: WordBool);
  1578. begin
  1579.   ControlInterface.SetColWidthAuto(nR1, nC1, nR2, nC2, bSetDefaults);
  1580. end;
  1581.  
  1582. procedure TF1Book.SetDefaultFont(const pName: WideString; nSize: Smallint);
  1583. begin
  1584.   ControlInterface.SetDefaultFont(pName, nSize);
  1585. end;
  1586.  
  1587. procedure TF1Book.SetFont(const pName: WideString; nSize: Smallint; bBold, bItalic, bUnderline, bStrikeout: WordBool; crColor: TColor; bOutline, bShadow: WordBool);
  1588. begin
  1589.   ControlInterface.SetFont(pName, nSize, bBold, bItalic, bUnderline, bStrikeout, crColor, bOutline, bShadow);
  1590. end;
  1591.  
  1592. procedure TF1Book.SetHdrSelection(bTopLeftHdr, bRowHdr, bColHdr: WordBool);
  1593. begin
  1594.   ControlInterface.SetHdrSelection(bTopLeftHdr, bRowHdr, bColHdr);
  1595. end;
  1596.  
  1597. procedure TF1Book.SetIteration(bIteration: WordBool; nMaxIterations: Smallint; nMaxChange: Double);
  1598. begin
  1599.   ControlInterface.SetIteration(bIteration, nMaxIterations, nMaxChange);
  1600. end;
  1601.  
  1602. procedure TF1Book.SetLineStyle(nStyle: Smallint; crColor: TColor; nWeight: Smallint);
  1603. begin
  1604.   ControlInterface.SetLineStyle(nStyle, crColor, nWeight);
  1605. end;
  1606.  
  1607. procedure TF1Book.SetPattern(nPattern: Smallint; crFG, crBG: TColor);
  1608. begin
  1609.   ControlInterface.SetPattern(nPattern, crFG, crBG);
  1610. end;
  1611.  
  1612. procedure TF1Book.SetPrintAreaFromSelection;
  1613. begin
  1614.   ControlInterface.SetPrintAreaFromSelection;
  1615. end;
  1616.  
  1617. procedure TF1Book.SetPrintScale(nScale: Smallint; bFitToPage: WordBool; nVPages, nHPages: Smallint);
  1618. begin
  1619.   ControlInterface.SetPrintScale(nScale, bFitToPage, nVPages, nHPages);
  1620. end;
  1621.  
  1622. procedure TF1Book.SetPrintTitlesFromSelection;
  1623. begin
  1624.   ControlInterface.SetPrintTitlesFromSelection;
  1625. end;
  1626.  
  1627. procedure TF1Book.SetProtection(bLocked, bHidden: WordBool);
  1628. begin
  1629.   ControlInterface.SetProtection(bLocked, bHidden);
  1630. end;
  1631.  
  1632. procedure TF1Book.SetRowHeight(nR1, nR2: Integer; nHeight: Smallint; bDefRowHeight: WordBool);
  1633. begin
  1634.   ControlInterface.SetRowHeight(nR1, nR2, nHeight, bDefRowHeight);
  1635. end;
  1636.  
  1637. procedure TF1Book.SetRowHeightAuto(nR1, nC1, nR2, nC2: Integer; bSetDefaults: WordBool);
  1638. begin
  1639.   ControlInterface.SetRowHeightAuto(nR1, nC1, nR2, nC2, bSetDefaults);
  1640. end;
  1641.  
  1642. procedure TF1Book.SetSelection(nR1, nC1, nR2, nC2: Integer);
  1643. begin
  1644.   ControlInterface.SetSelection(nR1, nC1, nR2, nC2);
  1645. end;
  1646.  
  1647. procedure TF1Book.ShowActiveCell;
  1648. begin
  1649.   ControlInterface.ShowActiveCell;
  1650. end;
  1651.  
  1652. procedure TF1Book.Sort3(nR1, nC1, nR2, nC2: Integer; bSortByRows: WordBool; nKey1, nKey2, nKey3: Integer);
  1653. begin
  1654.   ControlInterface.Sort3(nR1, nC1, nR2, nC2, bSortByRows, nKey1, nKey2, nKey3);
  1655. end;
  1656.  
  1657. procedure TF1Book.SortDlg;
  1658. begin
  1659.   ControlInterface.SortDlg;
  1660. end;
  1661.  
  1662. procedure TF1Book.StartEdit(bClear, bInCellEditFocus, bArrowsExitEditMode: WordBool);
  1663. begin
  1664.   ControlInterface.StartEdit(bClear, bInCellEditFocus, bArrowsExitEditMode);
  1665. end;
  1666.  
  1667. procedure TF1Book.SwapTables(hSS2: Integer);
  1668. begin
  1669.   ControlInterface.SwapTables(hSS2);
  1670. end;
  1671.  
  1672. procedure TF1Book.TransactCommit;
  1673. begin
  1674.   ControlInterface.TransactCommit;
  1675. end;
  1676.  
  1677. procedure TF1Book.TransactRollback;
  1678. begin
  1679.   ControlInterface.TransactRollback;
  1680. end;
  1681.  
  1682. procedure TF1Book.TransactStart;
  1683. begin
  1684.   ControlInterface.TransactStart;
  1685. end;
  1686.  
  1687. procedure TF1Book.TwipsToRC(x, y: Integer; var pRow, pCol: Integer);
  1688. begin
  1689.   ControlInterface.TwipsToRC(x, y, pRow, pCol);
  1690. end;
  1691.  
  1692. procedure TF1Book.SSUpdate;
  1693. begin
  1694.   ControlInterface.SSUpdate;
  1695. end;
  1696.  
  1697. function TF1Book.SSVersion: Smallint;
  1698. begin
  1699.   Result := ControlInterface.SSVersion;
  1700. end;
  1701.  
  1702. procedure TF1Book.Write(const pPathName: WideString; FileType: Smallint);
  1703. begin
  1704.   ControlInterface.Write(pPathName, FileType);
  1705. end;
  1706.  
  1707. procedure TF1Book.WriteToBlob(var phBlob: OLE_HANDLE; nReservedBytes: Smallint);
  1708. begin
  1709.   ControlInterface.WriteToBlob(phBlob, nReservedBytes);
  1710. end;
  1711.  
  1712. procedure TF1Book.SetRowHidden(nRow1, nRow2: Integer; bHidden: WordBool);
  1713. begin
  1714.   ControlInterface.SetRowHidden(nRow1, nRow2, bHidden);
  1715. end;
  1716.  
  1717. procedure TF1Book.SetColHidden(nCol1, nCol2: Integer; bHidden: WordBool);
  1718. begin
  1719.   ControlInterface.SetColHidden(nCol1, nCol2, bHidden);
  1720. end;
  1721.  
  1722. procedure TF1Book.SetColWidthTwips(nCol1, nCol2, nWidth: Integer; bDefColWidth: WordBool);
  1723. begin
  1724.   ControlInterface.SetColWidthTwips(nCol1, nCol2, nWidth, bDefColWidth);
  1725. end;
  1726.  
  1727. procedure TF1Book.EditInsertSheets;
  1728. begin
  1729.   ControlInterface.EditInsertSheets;
  1730. end;
  1731.  
  1732. procedure TF1Book.EditDeleteSheets;
  1733. begin
  1734.   ControlInterface.EditDeleteSheets;
  1735. end;
  1736.  
  1737. procedure TF1Book.InsertSheets(nSheet, nSheets: Integer);
  1738. begin
  1739.   ControlInterface.InsertSheets(nSheet, nSheets);
  1740. end;
  1741.  
  1742. procedure TF1Book.DeleteSheets(nSheet, nSheets: Integer);
  1743. begin
  1744.   ControlInterface.DeleteSheets(nSheet, nSheets);
  1745. end;
  1746.  
  1747. procedure TF1Book.Refresh;
  1748. begin
  1749.   ControlInterface.Refresh;
  1750. end;
  1751.  
  1752. function TF1Book.NextColPageBreak(Col: Integer): Integer;
  1753. begin
  1754.   Result := ControlInterface.NextColPageBreak(Col);
  1755. end;
  1756.  
  1757. function TF1Book.NextRowPageBreak(Row: Integer): Integer;
  1758. begin
  1759.   Result := ControlInterface.NextRowPageBreak(Row);
  1760. end;
  1761.  
  1762. function TF1Book.ObjFirstID: Integer;
  1763. begin
  1764.   Result := ControlInterface.ObjFirstID;
  1765. end;
  1766.  
  1767. function TF1Book.ObjNextID(ID: Integer): Integer;
  1768. begin
  1769.   Result := ControlInterface.ObjNextID(ID);
  1770. end;
  1771.  
  1772. function TF1Book.ObjGetItemCount(ID: Integer): Smallint;
  1773. begin
  1774.   Result := ControlInterface.ObjGetItemCount(ID);
  1775. end;
  1776.  
  1777. function TF1Book.ObjGetType(ID: Integer): Smallint;
  1778. begin
  1779.   Result := ControlInterface.ObjGetType(ID);
  1780. end;
  1781.  
  1782. function TF1Book.ObjGetSelectionCount: Smallint;
  1783. begin
  1784.   Result := ControlInterface.ObjGetSelectionCount;
  1785. end;
  1786.  
  1787. function TF1Book.FormatRCNr(Row, Col: Integer; DoAbsolute: WordBool): WideString;
  1788. begin
  1789.   Result := ControlInterface.FormatRCNr(Row, Col, DoAbsolute);
  1790. end;
  1791.  
  1792. function TF1Book.SS: Integer;
  1793. begin
  1794.   Result := ControlInterface.SS;
  1795. end;
  1796.  
  1797. function TF1Book.ErrorNumberToText(SSError: Integer): WideString;
  1798. begin
  1799.   Result := ControlInterface.ErrorNumberToText(SSError);
  1800. end;
  1801.  
  1802. function TF1Book.ObjNameToID(const Name: WideString): Integer;
  1803. begin
  1804.   Result := ControlInterface.ObjNameToID(Name);
  1805. end;
  1806.  
  1807. function TF1Book.DefinedNameCount: Integer;
  1808. begin
  1809.   Result := ControlInterface.DefinedNameCount;
  1810. end;
  1811.  
  1812. procedure TF1Book.ValidationRuleDlg;
  1813. begin
  1814.   ControlInterface.ValidationRuleDlg;
  1815. end;
  1816.  
  1817. procedure TF1Book.SetValidationRule(const Rule, Text: WideString);
  1818. begin
  1819.   ControlInterface.SetValidationRule(Rule, Text);
  1820. end;
  1821.  
  1822. procedure TF1Book.GetValidationRule(var Rule, Text: WideString);
  1823. begin
  1824.   ControlInterface.GetValidationRule(Rule, Text);
  1825. end;
  1826.  
  1827. function TF1Book.AutoFillItemsCount: Smallint;
  1828. begin
  1829.   Result := ControlInterface.AutoFillItemsCount;
  1830. end;
  1831.  
  1832. procedure TF1Book.CopyRangeEx(nDstSheet, nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcSheet, nSrcR1, nSrcC1, nSrcR2, nSrcC2: Integer);
  1833. begin
  1834.   ControlInterface.CopyRangeEx(nDstSheet, nDstR1, nDstC1, nDstR2, nDstC2, hSrcSS, nSrcSheet, nSrcR1, nSrcC1, nSrcR2, nSrcC2);
  1835. end;
  1836.  
  1837. procedure TF1Book.Sort(nR1, nC1, nR2, nC2: Integer; bSortByRows: WordBool; Keys: OleVariant);
  1838. begin
  1839.   ControlInterface.Sort(nR1, nC1, nR2, nC2, bSortByRows, Keys);
  1840. end;
  1841.  
  1842. procedure TF1Book.DeleteAutoFillItems(nIndex: Smallint);
  1843. begin
  1844.   ControlInterface.DeleteAutoFillItems(nIndex);
  1845. end;
  1846.  
  1847. procedure TF1Book.ODBCConnect(var pConnect: WideString; bShowErrors: WordBool; var pRetCode: Smallint);
  1848. begin
  1849.   ControlInterface.ODBCConnect(pConnect, bShowErrors, pRetCode);
  1850. end;
  1851.  
  1852. procedure TF1Book.ODBCDisconnect;
  1853. begin
  1854.   ControlInterface.ODBCDisconnect;
  1855. end;
  1856.  
  1857. procedure TF1Book.ODBCQuery(var pQuery: WideString; nRow, nCol: Integer; bForceShowDlg: WordBool; var pSetColNames, pSetColFormats, pSetColWidths, pSetMaxRC: WordBool; var pRetCode: Smallint);
  1858. begin
  1859.   ControlInterface.ODBCQuery(pQuery, nRow, nCol, bForceShowDlg, pSetColNames, pSetColFormats, pSetColWidths, pSetMaxRC, pRetCode);
  1860. end;
  1861.  
  1862. procedure TF1Book.LaunchDesigner;
  1863. begin
  1864.   ControlInterface.LaunchDesigner;
  1865. end;
  1866.  
  1867. procedure TF1Book.AboutBox;
  1868. begin
  1869.   ControlInterface.AboutBox;
  1870. end;
  1871.  
  1872. function TF1Book.Get_PrintDevMode: OLE_HANDLE;
  1873. begin
  1874.   Result := ControlInterface.PrintDevMode;
  1875. end;
  1876.  
  1877. procedure TF1Book.Set_PrintDevMode(var Value: OLE_HANDLE);
  1878. begin
  1879.   ControlInterface.PrintDevMode := Value;
  1880. end;
  1881.  
  1882. function TF1Book.Get_hWnd: OLE_HANDLE;
  1883. begin
  1884.   Result := ControlInterface.hWnd;
  1885. end;
  1886.  
  1887. procedure TF1Book.Set_hWnd(var Value: OLE_HANDLE);
  1888. begin
  1889.   ControlInterface.hWnd := Value;
  1890. end;
  1891.  
  1892. function TF1Book.Get_ColText(nCol: Integer): WideString;
  1893. begin
  1894.   Result := ControlInterface.ColText[nCol];
  1895. end;
  1896.  
  1897. procedure TF1Book.Set_ColText(nCol: Integer; const Value: WideString);
  1898. begin
  1899.   ControlInterface.ColText[nCol] := Value;
  1900. end;
  1901.  
  1902. function TF1Book.Get_DefinedName(const pName: WideString): WideString;
  1903. begin
  1904.   Result := ControlInterface.DefinedName[pName];
  1905. end;
  1906.  
  1907. procedure TF1Book.Set_DefinedName(const pName: WideString; const Value: WideString);
  1908. begin
  1909.   ControlInterface.DefinedName[pName] := Value;
  1910. end;
  1911.  
  1912. function TF1Book.Get_EntryRC(nRow, nCol: Integer): WideString;
  1913. begin
  1914.   Result := ControlInterface.EntryRC[nRow, nCol];
  1915. end;
  1916.  
  1917. procedure TF1Book.Set_EntryRC(nRow, nCol: Integer; const Value: WideString);
  1918. begin
  1919.   ControlInterface.EntryRC[nRow, nCol] := Value;
  1920. end;
  1921.  
  1922. function TF1Book.Get_FormattedTextRC(nRow, nCol: Integer): WideString;
  1923. begin
  1924.   Result := ControlInterface.FormattedTextRC[nRow, nCol];
  1925. end;
  1926.  
  1927. procedure TF1Book.Set_FormattedTextRC(nRow, nCol: Integer; const Value: WideString);
  1928. begin
  1929.   ControlInterface.FormattedTextRC[nRow, nCol] := Value;
  1930. end;
  1931.  
  1932. function TF1Book.Get_FormulaRC(nRow, nCol: Integer): WideString;
  1933. begin
  1934.   Result := ControlInterface.FormulaRC[nRow, nCol];
  1935. end;
  1936.  
  1937. procedure TF1Book.Set_FormulaRC(nRow, nCol: Integer; const Value: WideString);
  1938. begin
  1939.   ControlInterface.FormulaRC[nRow, nCol] := Value;
  1940. end;
  1941.  
  1942. function TF1Book.Get_LastColForRow(nRow: Integer): Integer;
  1943. begin
  1944.   Result := ControlInterface.LastColForRow[nRow];
  1945. end;
  1946.  
  1947. procedure TF1Book.Set_LastColForRow(nRow: Integer; Value: Integer);
  1948. begin
  1949.   ControlInterface.LastColForRow[nRow] := Value;
  1950. end;
  1951.  
  1952. function TF1Book.Get_LogicalRC(nRow, nCol: Integer): WordBool;
  1953. begin
  1954.   Result := ControlInterface.LogicalRC[nRow, nCol];
  1955. end;
  1956.  
  1957. procedure TF1Book.Set_LogicalRC(nRow, nCol: Integer; Value: WordBool);
  1958. begin
  1959.   ControlInterface.LogicalRC[nRow, nCol] := Value;
  1960. end;
  1961.  
  1962. function TF1Book.Get_NumberRC(nRow, nCol: Integer): Double;
  1963. begin
  1964.   Result := ControlInterface.NumberRC[nRow, nCol];
  1965. end;
  1966.  
  1967. procedure TF1Book.Set_NumberRC(nRow, nCol: Integer; Value: Double);
  1968. begin
  1969.   ControlInterface.NumberRC[nRow, nCol] := Value;
  1970. end;
  1971.  
  1972. function TF1Book.Get_RowText(nRow: Integer): WideString;
  1973. begin
  1974.   Result := ControlInterface.RowText[nRow];
  1975. end;
  1976.  
  1977. procedure TF1Book.Set_RowText(nRow: Integer; const Value: WideString);
  1978. begin
  1979.   ControlInterface.RowText[nRow] := Value;
  1980. end;
  1981.  
  1982. function TF1Book.Get_TextRC(nRow, nCol: Integer): WideString;
  1983. begin
  1984.   Result := ControlInterface.TextRC[nRow, nCol];
  1985. end;
  1986.  
  1987. procedure TF1Book.Set_TextRC(nRow, nCol: Integer; const Value: WideString);
  1988. begin
  1989.   ControlInterface.TextRC[nRow, nCol] := Value;
  1990. end;
  1991.  
  1992. function TF1Book.Get_TypeRC(nRow, nCol: Integer): Smallint;
  1993. begin
  1994.   Result := ControlInterface.TypeRC[nRow, nCol];
  1995. end;
  1996.  
  1997. procedure TF1Book.Set_TypeRC(nRow, nCol: Integer; Value: Smallint);
  1998. begin
  1999.   ControlInterface.TypeRC[nRow, nCol] := Value;
  2000. end;
  2001.  
  2002. function TF1Book.Get_ColWidth(nCol: Integer): Smallint;
  2003. begin
  2004.   Result := ControlInterface.ColWidth[nCol];
  2005. end;
  2006.  
  2007. procedure TF1Book.Set_ColWidth(nCol: Integer; Value: Smallint);
  2008. begin
  2009.   ControlInterface.ColWidth[nCol] := Value;
  2010. end;
  2011.  
  2012. function TF1Book.Get_RowHeight(nRow: Integer): Smallint;
  2013. begin
  2014.   Result := ControlInterface.RowHeight[nRow];
  2015. end;
  2016.  
  2017. procedure TF1Book.Set_RowHeight(nRow: Integer; Value: Smallint);
  2018. begin
  2019.   ControlInterface.RowHeight[nRow] := Value;
  2020. end;
  2021.  
  2022. function TF1Book.Get_DefinedNameByIndex(nName: Integer): WideString;
  2023. begin
  2024.   Result := ControlInterface.DefinedNameByIndex[nName];
  2025. end;
  2026.  
  2027. procedure TF1Book.Set_DefinedNameByIndex(nName: Integer; const Value: WideString);
  2028. begin
  2029.   ControlInterface.DefinedNameByIndex[nName] := Value;
  2030. end;
  2031.  
  2032. function TF1Book.Get_SheetName(nSheet: Integer): WideString;
  2033. begin
  2034.   Result := ControlInterface.SheetName[nSheet];
  2035. end;
  2036.  
  2037. procedure TF1Book.Set_SheetName(nSheet: Integer; const Value: WideString);
  2038. begin
  2039.   ControlInterface.SheetName[nSheet] := Value;
  2040. end;
  2041.  
  2042. function TF1Book.Get_PaletteEntry(nEntry: Integer): TColor;
  2043. begin
  2044.   Result := ControlInterface.PaletteEntry[nEntry];
  2045. end;
  2046.  
  2047. procedure TF1Book.Set_PaletteEntry(nEntry: Integer; Value: TColor);
  2048. begin
  2049.   ControlInterface.PaletteEntry[nEntry] := Value;
  2050. end;
  2051.  
  2052. function TF1Book.Get_ColWidthTwips(Col: Integer): Smallint;
  2053. begin
  2054.   Result := ControlInterface.ColWidthTwips[Col];
  2055. end;
  2056.  
  2057. procedure TF1Book.Set_ColWidthTwips(Col: Integer; Value: Smallint);
  2058. begin
  2059.   ControlInterface.ColWidthTwips[Col] := Value;
  2060. end;
  2061.  
  2062. function TF1Book.Get_ObjItem(ID: Integer; Item: Smallint): WideString;
  2063. begin
  2064.   Result := ControlInterface.ObjItem[ID, Item];
  2065. end;
  2066.  
  2067. procedure TF1Book.Set_ObjItem(ID: Integer; Item: Smallint; const Value: WideString);
  2068. begin
  2069.   ControlInterface.ObjItem[ID, Item] := Value;
  2070. end;
  2071.  
  2072. function TF1Book.Get_ObjItems(ID: Integer): WideString;
  2073. begin
  2074.   Result := ControlInterface.ObjItems[ID];
  2075. end;
  2076.  
  2077. procedure TF1Book.Set_ObjItems(ID: Integer; const Value: WideString);
  2078. begin
  2079.   ControlInterface.ObjItems[ID] := Value;
  2080. end;
  2081.  
  2082. function TF1Book.Get_ObjName(ID: Integer): WideString;
  2083. begin
  2084.   Result := ControlInterface.ObjName[ID];
  2085. end;
  2086.  
  2087. procedure TF1Book.Set_ObjName(ID: Integer; const Value: WideString);
  2088. begin
  2089.   ControlInterface.ObjName[ID] := Value;
  2090. end;
  2091.  
  2092. function TF1Book.Get_ObjText(ID: Integer): WideString;
  2093. begin
  2094.   Result := ControlInterface.ObjText[ID];
  2095. end;
  2096.  
  2097. procedure TF1Book.Set_ObjText(ID: Integer; const Value: WideString);
  2098. begin
  2099.   ControlInterface.ObjText[ID] := Value;
  2100. end;
  2101.  
  2102. function TF1Book.Get_ObjValue(ID: Integer): Smallint;
  2103. begin
  2104.   Result := ControlInterface.ObjValue[ID];
  2105. end;
  2106.  
  2107. procedure TF1Book.Set_ObjValue(ID: Integer; Value: Smallint);
  2108. begin
  2109.   ControlInterface.ObjValue[ID] := Value;
  2110. end;
  2111.  
  2112. function TF1Book.Get_ObjVisible(ID: Integer): WordBool;
  2113. begin
  2114.   Result := ControlInterface.ObjVisible[ID];
  2115. end;
  2116.  
  2117. procedure TF1Book.Set_ObjVisible(ID: Integer; Value: WordBool);
  2118. begin
  2119.   ControlInterface.ObjVisible[ID] := Value;
  2120. end;
  2121.  
  2122. function TF1Book.Get_AutoFillItems(Index: Smallint): WideString;
  2123. begin
  2124.   Result := ControlInterface.AutoFillItems[Index];
  2125. end;
  2126.  
  2127. procedure TF1Book.Set_AutoFillItems(Index: Smallint; const Value: WideString);
  2128. begin
  2129.   ControlInterface.AutoFillItems[Index] := Value;
  2130. end;
  2131.  
  2132. function TF1Book.Get_ColHidden(nCol: Integer): WordBool;
  2133. begin
  2134.   Result := ControlInterface.ColHidden[nCol];
  2135. end;
  2136.  
  2137. procedure TF1Book.Set_ColHidden(nCol: Integer; Value: WordBool);
  2138. begin
  2139.   ControlInterface.ColHidden[nCol] := Value;
  2140. end;
  2141.  
  2142. function TF1Book.Get_RowHidden(nRow: Integer): WordBool;
  2143. begin
  2144.   Result := ControlInterface.RowHidden[nRow];
  2145. end;
  2146.  
  2147. procedure TF1Book.Set_RowHidden(nRow: Integer; Value: WordBool);
  2148. begin
  2149.   ControlInterface.RowHidden[nRow] := Value;
  2150. end;
  2151.  
  2152. function TF1Book.Get_SheetSelected(nSheet: Integer): WordBool;
  2153. begin
  2154.   Result := ControlInterface.SheetSelected[nSheet];
  2155. end;
  2156.  
  2157. procedure TF1Book.Set_SheetSelected(nSheet: Integer; Value: WordBool);
  2158. begin
  2159.   ControlInterface.SheetSelected[nSheet] := Value;
  2160. end;
  2161.  
  2162.  
  2163. procedure Register;
  2164. begin
  2165.   RegisterComponents('ActiveX', [TF1Book]);  { do not localize }
  2166. end;
  2167.  
  2168. end.
  2169.