我把它贴出来的
这是金蝶财务软件中的表格控件。文件是system32/kdgrida.ocx
其中KDGRID2000中有一个CELL属性在VB中可以使用。
在DELPHI5中却没有这个属性。请各位老大帮我一下吧
unit KDGRID2000Lib_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// PASTLWTR : $Revision: 1.88 $
// File generated on 2006-08-02 15:58:25 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:/WINDOWS/system32/KDGridA.ocx (1)
// IID/LCID: {72E0BC4F-ADD3-11D3-B64C-0000EA77842F}/0
// Helpfile: e:/temp/htmlhelp/myhelp.chm
// DepndLst:
// (1) v2.0 stdole, (C:/WINDOWS/system32/stdole2.tlb)
// (2) v4.0 StdVCL, (C:/WINDOWS/system32/STDVCL40.DLL)
// Errors:
// Hint: Member 'Case' of 'IITS_Edit' changed to 'Case_'
// Hint: Member 'File' of '_DKDGrid2000' changed to 'File_'
// Hint: Member 'Type' of 'IICell' changed to 'Type_'
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
interface
uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
KDGRID2000LibMajorVersion = 3;
KDGRID2000LibMinorVersion = 0;
LIBID_KDGRID2000Lib: TGUID = '{72E0BC4F-ADD3-11D3-B64C-0000EA77842F}';
DIID_IITS_Button: TGUID = '{F3EFC157-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_Edit: TGUID = '{F3EFC160-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_Integer: TGUID = '{F3EFC169-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_Float: TGUID = '{F3EFC163-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_CheckBox: TGUID = '{F3EFC15A-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_ListBox: TGUID = '{F3EFC175-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_Date: TGUID = '{F3EFC15D-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_Account: TGUID = '{F3EFC16F-A07B-11D3-B62F-0000EA77842F}';
DIID_IITS_Tree: TGUID = '{702F76C1-D3CF-11D3-8040-0000EA77842F}';
DIID__DKDGrid2000: TGUID = '{72E0BC50-ADD3-11D3-B64C-0000EA77842F}';
DIID_IIFace: TGUID = '{8287237C-8532-11D3-B5EF-0000EA77842F}';
CLASS_IFace: TGUID = '{8287237E-8532-11D3-B5EF-0000EA77842F}';
DIID_IIRowInfo: TGUID = '{21738099-9E1F-11D3-B62B-0000EA77842F}';
CLASS_IRowInfo: TGUID = '{2173809B-9E1F-11D3-B62B-0000EA77842F}';
DIID_IIRow: TGUID = '{984819C7-9CB0-11D3-B628-0000EA77842F}';
CLASS_IRow: TGUID = '{984819C9-9CB0-11D3-B628-0000EA77842F}';
DIID_IIColInfo: TGUID = '{21738096-9E1F-11D3-B62B-0000EA77842F}';
CLASS_IColInfo: TGUID = '{21738098-9E1F-11D3-B62B-0000EA77842F}';
DIID_IICol: TGUID = '{984819C4-9CB0-11D3-B628-0000EA77842F}';
CLASS_iCol: TGUID = '{984819C6-9CB0-11D3-B628-0000EA77842F}';
DIID_IIPrinter: TGUID = '{BEA63583-A61F-11D3-B63B-0000EA77842F}';
CLASS_IPrinter: TGUID = '{BEA63585-A61F-11D3-B63B-0000EA77842F}';
DIID_IIPrintHF: TGUID = '{DEE618B1-A634-11D3-B63B-0000EA77842F}';
CLASS_IPrintHF: TGUID = '{DEE618B3-A634-11D3-B63B-0000EA77842F}';
DIID_IIPrintRow: TGUID = '{DEE618B4-A634-11D3-B63B-0000EA77842F}';
CLASS_IPrintRow: TGUID = '{DEE618B6-A634-11D3-B63B-0000EA77842F}';
DIID_IIFile: TGUID = '{F864EC13-9D50-11D3-B629-0000EA77842F}';
CLASS_IFile: TGUID = '{F864EC15-9D50-11D3-B629-0000EA77842F}';
DIID_IIEditor: TGUID = '{72A27D21-AD32-11D3-B64B-0000EA77842F}';
CLASS_IEditor: TGUID = '{72A27D23-AD32-11D3-B64B-0000EA77842F}';
DIID_IICell: TGUID = '{9AD1F503-9D7A-11D3-B62A-0000EA77842F}';
CLASS_ICell: TGUID = '{9AD1F505-9D7A-11D3-B62A-0000EA77842F}';
DIID_IIShowStyle: TGUID = '{80BDFDE6-A231-11D3-B635-0000EA77842F}';
CLASS_IShowStyle: TGUID = '{80BDFDE8-A231-11D3-B635-0000EA77842F}';
DIID_IIBorder: TGUID = '{C6B93897-A2D2-11D3-B636-0000EA77842F}';
CLASS_IBorder: TGUID = '{C6B93899-A2D2-11D3-B636-0000EA77842F}';
DIID__DKDGrid2000Events: TGUID = '{72E0BC51-ADD3-11D3-B64C-0000EA77842F}';
CLASS_KDGrid2000: TGUID = '{72E0BC52-ADD3-11D3-B64C-0000EA77842F}';
CLASS_ITSButton: TGUID = '{F3EFC159-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSEdit: TGUID = '{F3EFC162-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSInteger: TGUID = '{F3EFC16B-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSFloat: TGUID = '{F3EFC165-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSCheckBox: TGUID = '{F3EFC15C-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSListBox: TGUID = '{F3EFC177-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSDate: TGUID = '{F3EFC15F-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSAccount: TGUID = '{F3EFC171-A07B-11D3-B62F-0000EA77842F}';
CLASS_ITSTree: TGUID = '{702F76C3-D3CF-11D3-8040-0000EA77842F}';
// *********************************************************************//
// Declaration of Enumerations defined in Type Library
// *********************************************************************//
// Constants for enum KDGRID_DEF
type
KDGRID_DEF = TOleEnum;
const
KDGRID_NONE = $00000000;
KDGRID_ROW = $00000001;
KDGRID_COL = $00000002;
KDGRID_CELL = $00000004;
KDGRID_GRID = $00000008;
// Constants for enum KDGRID_OPT
type
KDGRID_OPT = TOleEnum;
const
OPT_FAIL = $00000001;
OPT_NONE = $00000002;
OPT_CANCEL = $00000003;
OPT_PARAM = $00000004;
OPT_SUCC = $00000000;
// Constants for enum KDGRID_SelectMode
type
KDGRID_SelectMode = TOleEnum;
const
SELECT_NONE = $00000000;
SELECT_CELL = $00000004;
SELECT_CELLS = $00001004;
SELECT_ROW = $00000001;
SELECT_ROWS = $00001001;
SELECT_COL = $00000002;
SELECT_COLS = $00001002;
// Constants for enum KDGRID_EnterDir
type
KDGRID_EnterDir = TOleEnum;
const
ED_NONE = $00000000;
ED_UP = $00000001;
ED_DOWN = $00000002;
ED_LEFT = $00000003;
ED_RIGHT = $00000004;
// Constants for enum KDGRID_Switch
type
KDGRID_Switch = TOleEnum;
const
SWID_NONE = $00000000;
SWID_AUTO_REDRAW = $00000001;
SWID_GRID_LOCKED = $00000002;
SWID_GRID_FROZEN = $00000004;
SWID_EDIT_SHORTCUT = $00000008;
SWID_DRAW_TITLE3D = $00000010;
SWID_ROW_RESIZE = $00000020;
SWID_COL_RESIZE = $00000040;
SWID_DRAW_OPTIMIZE = $00000080;
SWID_FOR_WEB = $00000100;
// Constants for enum KDGRID_Title
type
KDGRID_Title = TOleEnum;
const
TITLE_NONE = $00000000;
TITLE_123 = $00000001;
TITLE_ABC = $00000002;
// Constants for enum KDGRID_Scroll
type
KDGRID_Scroll = TOleEnum;
const
SCR_PREV = $00000000;
SCR_NEXT = $00000001;
SCR_PREV_PAGE = $00000002;
SCR_NEXT_PAGE = $00000003;
SCR_POSITION = $00000004;
SCR_FIRST = $00000006;
SCR_LAST = $00000007;
// Constants for enum KDGRID_Order
type
KDGRID_Order = TOleEnum;
const
ORDER_NONE = $00000000;
ORDER_VALUE_ASC = $00000001;
ORDER_VALUE_DESC = $00000002;
ORDER_TEXT_ASC = $00000003;
ORDER_TEXT_DESC = $00000004;
// Constants for enum KDGRID_Total
type
KDGRID_Total = TOleEnum;
const
TOTAL_SUM = $00000000;
TOTAL_MIN = $00000001;
TOTAL_MAX = $00000002;
TOTAL_AVG = $00000003;
// Constants for enum KDGRID_CellType
type
KDGRID_CellType = TOleEnum;
const
CT_NONE = $00000000;
CT_EDIT = $00000001;
CT_BUTTON = $00000002;
CT_CHECKBOX = $00000003;
CT_LISTBOX = $00000004;
CT_INTEGER = $00000005;
CT_FLOAT = $00000006;
CT_DATE = $00000007;
CT_ACCOUNT = $00000009;
CT_TREE = $0000000A;
CT_CUSTOM = $00000020;
// Constants for enum KDGRID_Edit_Charset
type
KDGRID_Edit_Charset = TOleEnum;
const
ECS_ALL = $00000000;
ECS_LETTER = $00000001;
ECS_DIGITAL = $00000002;
// Constants for enum KDGRID_Edit_Case
type
KDGRID_Edit_Case = TOleEnum;
const
EC_BOTH = $00000000;
EC_LOWER = $00000001;
EC_UPPER = $00000002;
// Constants for enum KDGRID_Edit_ShowMode
type
KDGRID_Edit_ShowMode = TOleEnum;
const
ESM_ACTIVE = $00000000;
ESM_ALWAYS = $00000001;
// Constants for enum KDGRID_Button_Image
type
KDGRID_Button_Image = TOleEnum;
const
BTNIMG_NONE = $00000000;
BTNIMG_OPEN = $00000001;
BTNIMG_FIND = $00000002;
BTNIMG_LOOKUP = $00000003;
BTNIMG_ACCOUNT = $00000004;
// Constants for enum KDGRID_Listbox_Style
type
KDGRID_Listbox_Style = TOleEnum;
const
LBS_LIST = $00000000;
LBS_COMBO = $00000001;
// Constants for enum KDGRID_Listbox_ShowMode
type
KDGRID_Listbox_ShowMode = TOleEnum;
const
LBSM_ACTIVE = $00000000;
LBSM_ALWAYS = $00000001;
// Constants for enum KDGRID_Image_ShowMode
type
KDGRID_Image_ShowMode = TOleEnum;
const
ISM_NORMAL = $00000000;
ISM_FILL = $00000001;
ISM_SCALE = $00000002;
// Constants for enum KDGRID_Align
type
KDGRID_Align = TOleEnum;
const
LEFT_TOP = $00000000;
LEFT_CENTER = $00000001;
LEFT_BOTTOM = $00000002;
CENTER_TOP = $00000003;
CENTER_CENTER = $00000004;
CENTER_BOTTOM = $00000005;
RIGHT_TOP = $00000006;
RIGHT_CENTER = $00000007;
RIGHT_BOTTOM = $00000008;
// Constants for enum KDGRID_Border
type
KDGRID_Border = TOleEnum;
const
BID_LEFT = $00000001;
BID_TOP = $00000002;
BID_RIGHT = $00000004;
BID_BOTTOM = $00000008;
BID_MIDHORI = $00000010;
BID_MIDVERT = $00000020;
BID_HORI = $0000001A;
BID_VERT = $00000025;
BID_FRAME = $0000000F;
BID_ALL = $0000003F;
// Constants for enum KDGRID_LineStyle
type
KDGRID_LineStyle = TOleEnum;
const
LS_TRANSPARENT = $00000000;
LS_SOLID = $00000001;
LS_DASH = $00000002;
LS_DOT = $00000003;
LS_DASH_DOT = $00000004;
LS_DASH_DOT_DOT = $00000005;
// Constants for enum KDGRID_EVENT_CellEdit
type
KDGRID_EVENT_CellEdit = TOleEnum;
const
CELL_EDIT_begin
= $00000101;
CELL_EDIT_END = $00000201;
CUSTOM_DATA_begin
= $00000102;
CUSTOM_DATA_END = $00000202;
EDITOR_KILL_FOCUS = $00000003;
EDITOR_SET_FOCUS = $00000004;
CELL_DATA_begin
= $00000005;
CELL_DATA_END = $00000006;
ERROR_GRID_LOCKED = $80000003;
ERROR_CELL_LOCKED = $80000005;
// Constants for enum KDGRID_EVENT_CellEditing
type
KDGRID_EVENT_CellEditing = TOleEnum;
const
EDITOR_KEYDOWN = $00000100;
EDITOR_KEYPRESS = $00000200;
EDITOR_KEYUP = $00000400;
BUTTON_CLICK = $00001002;
CHECKBOX_CLICK = $00001003;
LISTBOX_DROPDOWN = $00001004;
LISTBOX_SELCHANGE = $00002004;
EDIT_INPUT = $00001001;
// Constants for enum KDGRID_EVENT_Block
type
KDGRID_EVENT_Block = TOleEnum;
const
SELECT_BLOCK_begin
= $00001100;
SELECT_BLOCK_END = $00001200;
DRAG_BLOCK_begin
= $00002100;
DRAG_BLOCK_END = $00002200;
FILL_BLOCK_begin
= $00004100;
FILL_BLOCK_END = $00004200;
ERROR_GRID_FROZEN = $80000004;
ERROR_CELL_FROZEN = $80000006;
ERROR_BLOCK_OVERFLOW = $80000007;
ERROR_GRID_FIRST = $80000008;
ERROR_GRID_LAST = $80000009;
// Constants for enum KDGRID_EVENT_Resize
type
KDGRID_EVENT_Resize = TOleEnum;
const
RESIZE_ROW_begin
= $00000101;
RESIZE_ROW_END = $00000201;
RESIZE_COL_begin
= $00000102;
RESIZE_COL_END = $00000202;
RESIZE_ROW_FITLY = $00001001;
RESIZE_COL_FITLY = $00001002;
ERROR_WIDTH_LOCKED = $80000001;
ERROR_HEIGHT_LOCKED = $80000002;
// Constants for enum KDGRID_EVENT_Scroll
type
KDGRID_EVENT_Scroll = TOleEnum;
const
SCROLL_ROW_begin
= $00000101;
SCROLL_ROW_END = $00000201;
SCROLL_COL_begin
= $00000102;
SCROLL_COL_END = $00000202;
// Constants for enum KDGRID_PrintContext
type
KDGRID_PrintContext = TOleEnum;
const
PRINT_TEXT = $00000000;
PRINT_TAB = $00000001;
PRINT_DATE = $00000002;
PRINT_PAGENO = $00000003;
PRINT_PAGENUM = $00000004;
// Constants for enum KDGRID_PageMode
type
KDGRID_PageMode = TOleEnum;
const
PM_GRID = $00000000;
PM_PAGE = $00000001;
PM_PAGE2 = $00000002;
// Constants for enum KDGRID_Print
type
KDGRID_Print = TOleEnum;
const
PRINT_DIRECT = $00000000;
PRINT_SELECT = $00000001;
PRINT_PREVIEW = $00000002;
// Constants for enum KDGRID_PrintSwitch
type
KDGRID_PrintSwitch = TOleEnum;
const
PSW_NONE = $00000000;
PSW_PAGE_COLOR = $00000001;
PSW_GRID_FRAME = $00000002;
PSW_GRID_LINE = $00000004;
PSW_GRID_3D = $00000008;
PSW_GRID_MERGE = $00000020;
PSW_FOOTER_FLOAT = $00000010;
// Constants for enum KDGRID_Compatibility
type
KDGRID_Compatibility = TOleEnum;
const
CELL_DATA_UPDATED = $00000006;
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IITS_Button = dispinterface;
IITS_Edit = dispinterface;
IITS_Integer = dispinterface;
IITS_Float = dispinterface;
IITS_CheckBox = dispinterface;
IITS_ListBox = dispinterface;
IITS_Date = dispinterface;
IITS_Account = dispinterface;
IITS_Tree = dispinterface;
_DKDGrid2000 = dispinterface;
IIFace = dispinterface;
IIRowInfo = dispinterface;
IIRow = dispinterface;
IIColInfo = dispinterface;
IICol = dispinterface;
IIPrinter = dispinterface;
IIPrintHF = dispinterface;
IIPrintRow = dispinterface;
IIFile = dispinterface;
IIEditor = dispinterface;
IICell = dispinterface;
IIShowStyle = dispinterface;
IIBorder = dispinterface;
_DKDGrid2000Events = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
IFace = IIFace;
IRowInfo = IIRowInfo;
IRow = IIRow;
IColInfo = IIColInfo;
iCol = IICol;
IPrinter = IIPrinter;
IPrintHF = IIPrintHF;
IPrintRow = IIPrintRow;
IFile = IIFile;
IEditor = IIEditor;
ICell = IICell;
IShowStyle = IIShowStyle;
IBorder = IIBorder;
KDGrid2000 = _DKDGrid2000;
ITSButton = IITS_Button;
ITSEdit = IITS_Edit;
ITSInteger = IITS_Integer;
ITSFloat = IITS_Float;
ITSCheckBox = IITS_CheckBox;
ITSListBox = IITS_ListBox;
ITSDate = IITS_Date;
ITSAccount = IITS_Account;
ITSTree = IITS_Tree;
// *********************************************************************//
// Declaration of structures, unions and aliases.
// *********************************************************************//
PInteger1 = ^Integer;
{*}
PSmallint1 = ^Smallint;
{*}
// *********************************************************************//
// DispIntf: IITS_Button
// Flags: (4096) Dispatchable
// GUID: {F3EFC157-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_Button = dispinterface
['{F3EFC157-A07B-11D3-B62F-0000EA77842F}']
property AttachName: WideString dispid 1;
property ShowMode: KDGRID_Image_ShowMode dispid 2;
property ButtonLike: WordBool dispid 3;
property AttachHandle: OLE_HANDLE dispid 4;
property HotKey: Integer dispid 5;
end;
// *********************************************************************//
// DispIntf: IITS_Edit
// Flags: (4096) Dispatchable
// GUID: {F3EFC160-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_Edit = dispinterface
['{F3EFC160-A07B-11D3-B62F-0000EA77842F}']
property Button: IITS_Button dispid 1;
property Case_: KDGRID_Edit_Case dispid 2;
property MaxLength: Integer dispid 3;
property PasswordChar: Smallint dispid 5;
property ReadOnly: WordBool dispid 6;
property MutiLine: WordBool dispid 4;
property ShowMode: KDGRID_Edit_ShowMode dispid 7;
property CharSet: KDGRID_Edit_Charset dispid 8;
end;
// *********************************************************************//
// DispIntf: IITS_Integer
// Flags: (4096) Dispatchable
// GUID: {F3EFC169-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_Integer = dispinterface
['{F3EFC169-A07B-11D3-B62F-0000EA77842F}']
property Format: WideString dispid 1;
property Max: Integer dispid 2;
property Min: Integer dispid 3;
end;
// *********************************************************************//
// DispIntf: IITS_Float
// Flags: (4096) Dispatchable
// GUID: {F3EFC163-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_Float = dispinterface
['{F3EFC163-A07B-11D3-B62F-0000EA77842F}']
property Format: WideString dispid 1;
property Max:do
uble dispid 2;
property Min:do
uble dispid 3;
end;
// *********************************************************************//
// DispIntf: IITS_CheckBox
// Flags: (4096) Dispatchable
// GUID: {F3EFC15A-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_CheckBox = dispinterface
['{F3EFC15A-A07B-11D3-B62F-0000EA77842F}']
end;
// *********************************************************************//
// DispIntf: IITS_ListBox
// Flags: (4096) Dispatchable
// GUID: {F3EFC175-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_ListBox = dispinterface
['{F3EFC175-A07B-11D3-B62F-0000EA77842F}']
property Style: KDGRID_Listbox_Style dispid 1;
property ShowMode: KDGRID_Listbox_ShowMode dispid 2;
property DropItems: Integer dispid 3;
property ListCount: Integer dispid 4;
property ListIndex: Integer dispid 5;
property Text: WideString dispid 6;
property List[iIndex: Integer]: WideString dispid 10;
function AddItem(const strItem: WideString;
viIndex: OleVariant): Integer;
dispid 7;
function RemoveItem(viIndex: OleVariant): Integer;
dispid 8;
function FindText(const strItem: WideString): Integer;
dispid 9;
property ItemData[iIndex: Integer]: WideString dispid 11;
end;
// *********************************************************************//
// DispIntf: IITS_Date
// Flags: (4096) Dispatchable
// GUID: {F3EFC15D-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_Date = dispinterface
['{F3EFC15D-A07B-11D3-B62F-0000EA77842F}']
property Max: TDateTime dispid 1;
property Min: TDateTime dispid 2;
property Format: WideString dispid 3;
end;
// *********************************************************************//
// DispIntf: IITS_Account
// Flags: (4096) Dispatchable
// GUID: {F3EFC16F-A07B-11D3-B62F-0000EA77842F}
// *********************************************************************//
IITS_Account = dispinterface
['{F3EFC16F-A07B-11D3-B62F-0000EA77842F}']
property DecLineColor: OLE_COLOR dispid 1;
property DecimalBits: Integer dispid 2;
property IntegerBits: Integer dispid 3;
property KiloLineColor: OLE_COLOR dispid 4;
property LineColor: OLE_COLOR dispid 5;
property Min:do
uble dispid 6;
property Max:do
uble dispid 7;
end;
// *********************************************************************//
// DispIntf: IITS_Tree
// Flags: (4096) Dispatchable
// GUID: {702F76C1-D3CF-11D3-8040-0000EA77842F}
// *********************************************************************//
IITS_Tree = dispinterface
['{702F76C1-D3CF-11D3-8040-0000EA77842F}']
property IsSubtotal: WordBool dispid 1;
property IsCollapsed: WordBool dispid 2;
property Level: Integer dispid 3;
end;
// *********************************************************************//
// DispIntf: _DKDGrid2000
// Flags: (4112) Hidden Dispatchable
// GUID: {72E0BC50-ADD3-11D3-B64C-0000EA77842F}
// *********************************************************************//
_DKDGrid2000 = dispinterface
['{72E0BC50-ADD3-11D3-B64C-0000EA77842F}']
property Appearance: Smallint dispid -520;
property BackColor: OLE_COLOR dispid -501;
property BorderStyle: Smallint dispid -504;
property Enabled: WordBool dispid -514;
property Font: IFontDisp dispid -512;
property ForeColor: OLE_COLOR dispid -513;
property hWnd: OLE_HANDLE dispid -515;
property Face: IFace dispid 1;
property Row: IRowInfo dispid 2;
property Col: IColInfo dispid 3;
property Printer: IPrinter dispid 4;
property File_: IFile dispid 5;
property Editor: IEditor dispid 6;
property Version: WideString dispid 7;
property Cancel: WordBool dispid 8;
function Cell(IRow: Integer;
iCol: Integer;
viRow2: OleVariant;
viCol2: OleVariant): ICell;
dispid 19;
property Switch[eSWID: KDGRID_Switch]: WordBool dispid 20;
function SetDim(iRows: Integer;
iCols: Integer): KDGRID_OPT;
dispid 9;
function InsertRow(IRow: Integer;
viRows: OleVariant): KDGRID_OPT;
dispid 10;
function InsertCol(iCol: Integer;
viCols: OleVariant): KDGRID_OPT;
dispid 11;
function DeleteRow(IRow: Integer;
viRows: OleVariant): KDGRID_OPT;
dispid 12;
function DeleteCol(iCol: Integer;
viCols: OleVariant): KDGRID_OPT;
dispid 13;
function GetSelect(var riRow: Integer;
var riCol: Integer;
var riRow2: Integer;
var riCol2: Integer): KDGRID_DEF;
dispid 14;
function SetSelect(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_DEF;
dispid 15;
function MergeBlock(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_OPT;
dispid 16;
function SplitBlock(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_OPT;
dispid 17;
function TotalValue(eTotal: KDGRID_Total;
IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer):do
uble;
dispid 18;
procedure AboutBox;
dispid -552;
end;
// *********************************************************************//
// DispIntf: IIFace
// Flags: (4096) Dispatchable
// GUID: {8287237C-8532-11D3-B5EF-0000EA77842F}
// *********************************************************************//
IIFace = dispinterface
['{8287237C-8532-11D3-B5EF-0000EA77842F}']
property BackGround: OLE_COLOR dispid 1;
property EnterDir: KDGRID_EnterDir dispid 2;
property SelectMode: KDGRID_SelectMode dispid 3;
property Rows: Integer dispid 4;
property Cols: Integer dispid 5;
property FixRows: Integer dispid 6;
property FixCols: Integer dispid 7;
property FixRows2: Integer dispid 8;
property FixCols2: Integer dispid 9;
property TitleRows: Integer dispid 10;
property TitleCols: Integer dispid 11;
property DefRowHeight: Single dispid 12;
property DefColWidth: Single dispid 13;
end;
// *********************************************************************//
// DispIntf: IIRowInfo
// Flags: (4096) Dispatchable
// GUID: {21738099-9E1F-11D3-B62B-0000EA77842F}
// *********************************************************************//
IIRowInfo = dispinterface
['{21738099-9E1F-11D3-B62B-0000EA77842F}']
property DefHeight: Single dispid 6;
property Rows: Integer dispid 1;
property FixRows: Integer dispid 2;
property FixRows2: Integer dispid 3;
property TitleRows: Integer dispid 4;
property ScrRow: Integer dispid 5;
property SelRow: Integer dispid 7;
property SelRows: Integer dispid 8;
function Index(iRC: Integer;
viERC: OleVariant): IRow;
dispid 12;
function _Index(iRC: Integer;
viERC: OleVariant): IRow;
dispid 0;
function Scroll(eOpt: KDGRID_Scroll;
viPos: OleVariant): KDGRID_OPT;
dispid 9;
function Delete(iPos: Integer;
viNum: OleVariant): KDGRID_OPT;
dispid 10;
function Insert(iPos: Integer;
viNum: OleVariant): KDGRID_OPT;
dispid 11;
end;
// *********************************************************************//
// DispIntf: IIRow
// Flags: (4096) Dispatchable
// GUID: {984819C7-9CB0-11D3-B628-0000EA77842F}
// *********************************************************************//
IIRow = dispinterface
['{984819C7-9CB0-11D3-B628-0000EA77842F}']
property IsDefHeight: WordBool dispid 1;
property PageBreak: WordBool dispid 2;
property Visible: WordBool dispid 3;
property Height: Single dispid 4;
property HeightLocked: WordBool dispid 5;
property Title: KDGRID_Title dispid 6;
function Sort(eOrder: KDGRID_Order;
iCol: Integer;
iCol2: Integer): KDGRID_OPT;
dispid 7;
end;
// *********************************************************************//
// DispIntf: IIColInfo
// Flags: (4096) Dispatchable
// GUID: {21738096-9E1F-11D3-B62B-0000EA77842F}
// *********************************************************************//
IIColInfo = dispinterface
['{21738096-9E1F-11D3-B62B-0000EA77842F}']
property DefWidth: Single dispid 1;
property Cols: Integer dispid 2;
property FixCols: Integer dispid 3;
property FixCols2: Integer dispid 4;
property TitleCols: Integer dispid 5;
property ScrCol: Integer dispid 6;
property SelCol: Integer dispid 7;
property SelCols: Integer dispid 8;
function Index(iRC: Integer;
viERC: OleVariant): iCol;
dispid 12;
function _Index(iRC: Integer;
viERC: OleVariant): iCol;
dispid 0;
function Scroll(eOpt: KDGRID_Scroll;
viPos: OleVariant): KDGRID_OPT;
dispid 9;
function Delete(iPos: Integer;
viNum: OleVariant): KDGRID_OPT;
dispid 10;
function Insert(iPos: Integer;
viNum: OleVariant): KDGRID_OPT;
dispid 11;
end;
// *********************************************************************//
// DispIntf: IICol
// Flags: (4096) Dispatchable
// GUID: {984819C4-9CB0-11D3-B628-0000EA77842F}
// *********************************************************************//
IICol = dispinterface
['{984819C4-9CB0-11D3-B628-0000EA77842F}']
property IsDefWidth: WordBool dispid 1;
property PageBreak: WordBool dispid 2;
property Visible: WordBool dispid 3;
property WidthLocked: WordBool dispid 4;
property Width: Single dispid 5;
property Title: KDGRID_Title dispid 6;
function Sort(eOrder: KDGRID_Order;
IRow: Integer;
iRow2: Integer): Integer;
dispid 7;
function SetTree(IRow: Integer;
iRow2: Integer): Integer;
dispid 8;
end;
// *********************************************************************//
// DispIntf: IIPrinter
// Flags: (4096) Dispatchable
// GUID: {BEA63583-A61F-11D3-B63B-0000EA77842F}
// *********************************************************************//
IIPrinter = dispinterface
['{BEA63583-A61F-11D3-B63B-0000EA77842F}']
property FixRows: Integer dispid 1;
property FixCols: Integer dispid 2;
property IsColor: WordBool dispid 3;
property GridFrame: WordBool dispid 4;
property GridLine: WordBool dispid 5;
property Header: IPrintHF dispid 6;
property Footer: IPrintHF dispid 7;
property PageMode: KDGRID_PageMode dispid 8;
property Grid3D: WordBool dispid 9;
property PageAlign: KDGRID_Align dispid 10;
function PageSetup: KDGRID_OPT;
dispid 11;
function Preview: KDGRID_OPT;
dispid 12;
function Setup: KDGRID_OPT;
dispid 13;
function do
Print(ePrint: KDGRID_Print): KDGRID_OPT;
dispid 14;
property Switch[ePSW: KDGRID_PrintSwitch]: WordBool dispid 15;
end;
// *********************************************************************//
// DispIntf: IIPrintHF
// Flags: (4096) Dispatchable
// GUID: {DEE618B1-A634-11D3-B63B-0000EA77842F}
// *********************************************************************//
IIPrintHF = dispinterface
['{DEE618B1-A634-11D3-B63B-0000EA77842F}']
property ForeColor: OLE_COLOR dispid 1;
property BackColor: OLE_COLOR dispid 2;
property Font: IFontDisp dispid 3;
// property Font: TFONT dispid 3;
property Rows: Integer dispid 4;
function Index(IRow: Integer): IPrintRow;
dispid 5;
function _Index(IRow: Integer): IPrintRow;
dispid 0;
end;
// *********************************************************************//
// DispIntf: IIPrintRow
// Flags: (4096) Dispatchable
// GUID: {DEE618B4-A634-11D3-B63B-0000EA77842F}
// *********************************************************************//
IIPrintRow = dispinterface
['{DEE618B4-A634-11D3-B63B-0000EA77842F}']
property ForeColor: OLE_COLOR dispid 1;
property BackColor: OLE_COLOR dispid 2;
// property Font: IFont dispid 3;
property Font: IFontDisp dispid 3;
property Context: WideString dispid 4;
function AddContext(eContextID: KDGRID_PrintContext;
varContext: OleVariant): KDGRID_OPT;
dispid 5;
end;
// *********************************************************************//
// DispIntf: IIFile
// Flags: (4096) Dispatchable
// GUID: {F864EC13-9D50-11D3-B629-0000EA77842F}
// *********************************************************************//
IIFile = dispinterface
['{F864EC13-9D50-11D3-B629-0000EA77842F}']
property Blob: OleVariant dispid 1;
function New: KDGRID_OPT;
dispid 2;
function Load(varFile: OleVariant): Integer;
dispid 3;
function Save(varFile: OleVariant): Integer;
dispid 4;
function SaveHtml(varFile: OleVariant): Integer;
dispid 5;
end;
// *********************************************************************//
// DispIntf: IIEditor
// Flags: (4096) Dispatchable
// GUID: {72A27D21-AD32-11D3-B64B-0000EA77842F}
// *********************************************************************//
IIEditor = dispinterface
['{72A27D21-AD32-11D3-B64B-0000EA77842F}']
property Row: Integer dispid 1;
property Col: Integer dispid 2;
property IsEditing: WordBool dispid 3;
property Text: WideString dispid 4;
property Value: OleVariant dispid 5;
property hWnd: OLE_HANDLE dispid 6;
property KeyCode: Integer dispid 7;
property Index[eType: KDGRID_CellType]: OLE_HANDLE dispid 12;
property _Index[eType: KDGRID_CellType]: OLE_HANDLE dispid 0;
default;
function begin
Edit(IRow: Integer;
iCol: Integer): KDGRID_OPT;
dispid 8;
function EndEdit(bUpdate: WordBool): KDGRID_OPT;
dispid 9;
function Update: KDGRID_OPT;
dispid 10;
function Refresh: KDGRID_OPT;
dispid 11;
end;
// *********************************************************************//
// DispIntf: IICell
// Flags: (4096) Dispatchable
// GUID: {9AD1F503-9D7A-11D3-B62A-0000EA77842F}
// *********************************************************************//
IICell = dispinterface
['{9AD1F503-9D7A-11D3-B62A-0000EA77842F}']
property Frozen: WordBool dispid 1;
property Locked: WordBool dispid 2;
property Merged: WordBool dispid 3;
property Type_: KDGRID_CellType dispid 4;
property Text: WideString dispid 5;
property Value: OleVariant dispid 6;
property Tag: OleVariant dispid 7;
property TypeSetting: IDispatch dispid 8;
property ShowStyle: IShowStyle dispid 9;
property Edit: IITS_Edit dispid 10;
property Button: IITS_Button dispid 11;
property ListBox: IITS_ListBox dispid 12;
property CheckBox: IITS_CheckBox dispid 13;
property Integer: IITS_Integer dispid 14;
property Float: IITS_Float dispid 15;
property Date: IITS_Date dispid 16;
property Tree: IITS_Tree dispid 17;
property Account: IITS_Account dispid 18;
function GetItem(viIndex: OleVariant): WideString;
dispid 19;
function DelItem(viIndex: OleVariant): KDGRID_OPT;
dispid 20;
function SetItem(const strItem: WideString;
viIndex: OleVariant): KDGRID_OPT;
dispid 21;
end;
// *********************************************************************//
// DispIntf: IIShowStyle
// Flags: (4096) Dispatchable
// GUID: {80BDFDE6-A231-11D3-B635-0000EA77842F}
// *********************************************************************//
IIShowStyle = dispinterface
['{80BDFDE6-A231-11D3-B635-0000EA77842F}']
property Align: KDGRID_Align dispid 1;
property ForeColor: OLE_COLOR dispid 2;
property BackColor: OLE_COLOR dispid 3;
property Font: IFontDisp dispid 4;
function Border(iID: KDGRID_Border): IBorder;
dispid 5;
end;
// *********************************************************************//
// DispIntf: IIBorder
// Flags: (4096) Dispatchable
// GUID: {C6B93897-A2D2-11D3-B636-0000EA77842F}
// *********************************************************************//
IIBorder = dispinterface
['{C6B93897-A2D2-11D3-B636-0000EA77842F}']
property Style: KDGRID_LineStyle dispid 1;
property Color: OLE_COLOR dispid 2;
end;
// *********************************************************************//
// DispIntf: _DKDGrid2000Events
// Flags: (4096) Dispatchable
// GUID: {72E0BC51-ADD3-11D3-B64C-0000EA77842F}
// *********************************************************************//
_DKDGrid2000Events = dispinterface
['{72E0BC51-ADD3-11D3-B64C-0000EA77842F}']
procedure Click;
dispid -600;
procedure DblClick;
dispid -601;
procedure KeyDown(var KeyCode: Smallint;
Shift: Smallint);
dispid -602;
procedure KeyPress(var KeyAscii: Smallint);
dispid -603;
procedure KeyUp(var KeyCode: Smallint;
Shift: Smallint);
dispid -604;
procedure MouseDown(Button: Smallint;
Shift: Smallint;
x: OLE_XPOS_PIXELS;
y: OLE_YPOS_PIXELS);
dispid -605;
procedure MouseUp(Button: Smallint;
Shift: Smallint;
x: OLE_XPOS_PIXELS;
y: OLE_YPOS_PIXELS);
dispid -607;
procedure ClickOpt(eEvent: KDGRID_DEF;
IRow: Integer;
iCol: Integer);
dispid 1;
procedure DblClickOpt(eEvent: KDGRID_DEF;
IRow: Integer;
iCol: Integer);
dispid 2;
procedure BlockOpt(eEvent: KDGRID_EVENT_Block;
IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer);
dispid 3;
procedure SelectChanged(IRow: Integer;
iCol: Integer;
iPreRow: Integer;
iPreCol: Integer);
dispid 4;
procedure ResizeOpt(eEvent: KDGRID_EVENT_Resize;
iRszRC: Integer;
iSizeXY: Integer);
dispid 5;
procedure ScrollOpt(eEvent: KDGRID_EVENT_Scroll;
eScroll: KDGRID_Scroll;
iScrRC: Integer);
dispid 6;
procedure CellEdit(eEvent: KDGRID_EVENT_CellEdit;
IRow: Integer;
iCol: Integer;
eType: KDGRID_CellType);
dispid 7;
procedure CellEditing(eEvent: KDGRID_EVENT_CellEditing;
IRow: Integer;
iCol: Integer;
eType: KDGRID_CellType);
dispid 8;
end;
// *********************************************************************//
// The Class CoIFace provides a Create and CreateRemote method to
// create instances of the default interface IIFace exposed by
// the CoClass IFace. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIFace = class
class function Create: IIFace;
class function CreateRemote(const MachineName: string): IIFace;
end;
// *********************************************************************//
// The Class CoIRowInfo provides a Create and CreateRemote method to
// create instances of the default interface IIRowInfo exposed by
// the CoClass IRowInfo. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIRowInfo = class
class function Create: IIRowInfo;
class function CreateRemote(const MachineName: string): IIRowInfo;
end;
// *********************************************************************//
// The Class CoIRow provides a Create and CreateRemote method to
// create instances of the default interface IIRow exposed by
// the CoClass IRow. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIRow = class
class function Create: IIRow;
class function CreateRemote(const MachineName: string): IIRow;
end;
// *********************************************************************//
// The Class CoIColInfo provides a Create and CreateRemote method to
// create instances of the default interface IIColInfo exposed by
// the CoClass IColInfo. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIColInfo = class
class function Create: IIColInfo;
class function CreateRemote(const MachineName: string): IIColInfo;
end;
// *********************************************************************//
// The Class CoiCol provides a Create and CreateRemote method to
// create instances of the default interface IICol exposed by
// the CoClass iCol. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoiCol = class
class function Create: IICol;
class function CreateRemote(const MachineName: string): IICol;
end;
// *********************************************************************//
// The Class CoIPrinter provides a Create and CreateRemote method to
// create instances of the default interface IIPrinter exposed by
// the CoClass IPrinter. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIPrinter = class
class function Create: IIPrinter;
class function CreateRemote(const MachineName: string): IIPrinter;
end;
// *********************************************************************//
// The Class CoIPrintHF provides a Create and CreateRemote method to
// create instances of the default interface IIPrintHF exposed by
// the CoClass IPrintHF. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIPrintHF = class
class function Create: IIPrintHF;
class function CreateRemote(const MachineName: string): IIPrintHF;
end;
// *********************************************************************//
// The Class CoIPrintRow provides a Create and CreateRemote method to
// create instances of the default interface IIPrintRow exposed by
// the CoClass IPrintRow. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIPrintRow = class
class function Create: IIPrintRow;
class function CreateRemote(const MachineName: string): IIPrintRow;
end;
// *********************************************************************//
// The Class CoIFile provides a Create and CreateRemote method to
// create instances of the default interface IIFile exposed by
// the CoClass IFile. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIFile = class
class function Create: IIFile;
class function CreateRemote(const MachineName: string): IIFile;
end;
// *********************************************************************//
// The Class CoIEditor provides a Create and CreateRemote method to
// create instances of the default interface IIEditor exposed by
// the CoClass IEditor. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIEditor = class
class function Create: IIEditor;
class function CreateRemote(const MachineName: string): IIEditor;
end;
// *********************************************************************//
// The Class CoICell provides a Create and CreateRemote method to
// create instances of the default interface IICell exposed by
// the CoClass ICell. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoICell = class
class function Create: IICell;
class function CreateRemote(const MachineName: string): IICell;
end;
// *********************************************************************//
// The Class CoIShowStyle provides a Create and CreateRemote method to
// create instances of the default interface IIShowStyle exposed by
// the CoClass IShowStyle. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIShowStyle = class
class function Create: IIShowStyle;
class function CreateRemote(const MachineName: string): IIShowStyle;
end;
// *********************************************************************//
// The Class CoIBorder provides a Create and CreateRemote method to
// create instances of the default interface IIBorder exposed by
// the CoClass IBorder. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoIBorder = class
class function Create: IIBorder;
class function CreateRemote(const MachineName: string): IIBorder;
end;
// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name : TKDGrid2000
// Help String : KDGrid Control
// Default Interface: _DKDGrid2000
// Def. Intf. DISP? : Yes
// Event Interface: _DKDGrid2000Events
// TypeFlags : (38) CanCreate Licensed Control
// *********************************************************************//
TKDGrid2000ClickOpt = procedure(Sender: TObject;
eEvent: KDGRID_DEF;
IRow: Integer;
iCol: Integer) of object;
TKDGrid2000DblClickOpt = procedure(Sender: TObject;
eEvent: KDGRID_DEF;
IRow: Integer;
iCol: Integer) of object;
TKDGrid2000BlockOpt = procedure(Sender: TObject;
eEvent: KDGRID_EVENT_Block;
IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer) of object;
TKDGrid2000SelectChanged = procedure(Sender: TObject;
IRow: Integer;
iCol: Integer;
iPreRow: Integer;
iPreCol: Integer) of object;
TKDGrid2000ResizeOpt = procedure(Sender: TObject;
eEvent: KDGRID_EVENT_Resize;
iRszRC: Integer;
iSizeXY: Integer) of object;
TKDGrid2000ScrollOpt = procedure(Sender: TObject;
eEvent: KDGRID_EVENT_Scroll;
eScroll: KDGRID_Scroll;
iScrRC: Integer) of object;
TKDGrid2000CellEdit = procedure(Sender: TObject;
eEvent: KDGRID_EVENT_CellEdit;
IRow: Integer;
iCol: Integer;
eType: KDGRID_CellType) of object;
TKDGrid2000CellEditing = procedure(Sender: TObject;
eEvent: KDGRID_EVENT_CellEditing;
IRow: Integer;
iCol: Integer;
eType: KDGRID_CellType) of object;
TKDGrid2000 = class(TOleControl)
private
FOnClickOpt: TKDGrid2000ClickOpt;
FOnDblClickOpt: TKDGrid2000DblClickOpt;
FOnBlockOpt: TKDGrid2000BlockOpt;
FOnSelectChanged: TKDGrid2000SelectChanged;
FOnResizeOpt: TKDGrid2000ResizeOpt;
FOnScrollOpt: TKDGrid2000ScrollOpt;
FOnCellEdit: TKDGrid2000CellEdit;
FOnCellEditing: TKDGrid2000CellEditing;
FIntf: _DKDGrid2000;
function GetControlInterface: _DKDGrid2000;
protected
procedure CreateControl;
procedure InitControlData;
override;
function Get_Face: IFace;
procedure Set_Face(const Value: IFace);
function Get_Row: IRowInfo;
procedure Set_Row(const Value: IRowInfo);
function Get_Col: IColInfo;
procedure Set_Col(const Value: IColInfo);
function Get_Printer: IPrinter;
procedure Set_Printer(const Value: IPrinter);
function Get_File_: IFile;
procedure Set_File_(const Value: IFile);
function Get_Editor: IEditor;
procedure Set_Editor(const Value: IEditor);
function Get_Cell(IRow: Integer;
iCol: Integer;
viRow2: OleVariant;
viCol2: OleVariant): ICell overload;
procedure Set_Cell(IRow: Integer;
iCol: Integer;
viRow2: OleVariant;
viCol2: OleVariant;
const Param5: IDispatch);
FUNCTION TMP_R():ICELL;
PROCEDURE TMP_W();
function Get_Switch(eSWID: KDGRID_Switch): WordBool;
procedure Set_Switch(eSWID: KDGRID_Switch;
Param2: WordBool);
public
function SetDim(iRows: Integer;
iCols: Integer): KDGRID_OPT;
function InsertRow(IRow: Integer): KDGRID_OPT;
overload;
function InsertRow(IRow: Integer;
viRows: OleVariant): KDGRID_OPT;
overload;
function InsertCol(iCol: Integer): KDGRID_OPT;
overload;
function InsertCol(iCol: Integer;
viCols: OleVariant): KDGRID_OPT;
overload;
function DeleteRow(IRow: Integer): KDGRID_OPT;
overload;
function DeleteRow(IRow: Integer;
viRows: OleVariant): KDGRID_OPT;
overload;
function DeleteCol(iCol: Integer): KDGRID_OPT;
overload;
function DeleteCol(iCol: Integer;
viCols: OleVariant): KDGRID_OPT;
overload;
function GetSelect(var riRow: Integer;
var riCol: Integer;
var riRow2: Integer;
var riCol2: Integer): KDGRID_DEF;
function SetSelect(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_DEF;
function MergeBlock(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_OPT;
function SplitBlock(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_OPT;
function TotalValue(eTotal: KDGRID_Total;
IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer):do
uble;
procedure AboutBox;
property ControlInterface: _DKDGrid2000 read GetControlInterface;
property DefaultInterface: _DKDGrid2000 read GetControlInterface;
property Switch[eSWID: KDGRID_Switch]: WordBool read Get_Switch write Set_Switch;
published
property ParentColor;
property ParentFont;
property TabStop;
property Align;
property DragCursor;
property DragMode;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property Visible;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property OnMouseUp;
property OnMouseDown;
property OnKeyUp;
property OnKeyPress;
property OnKeyDown;
property OnDblClick;
property OnClick;
property Appearance: Smallint index -520 read GetSmallintProp write SetSmallintProp stored False;
property BackColor: TColor index -501 read GetTColorProp write SetTColorProp stored False;
property BorderStyle: Smallint index -504 read GetSmallintProp write SetSmallintProp stored False;
property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp stored False;
property Font: TFont index -512 read GetTFontProp write SetTFontProp stored False;
property ForeColor: TColor index -513 read GetTColorProp write SetTColorProp stored False;
property hWnd: Integer index -515 read GetIntegerProp write SetIntegerProp stored False;
property Face: IFace read Get_Face write Set_Face stored False;
property Row: IRowInfo read Get_Row write Set_Row stored False;
property Col: IColInfo read Get_Col write Set_Col stored False;
property Printer: IPrinter read Get_Printer write Set_Printer stored False;
property File_: IFile read Get_File_ write Set_File_ stored False;
property Editor: IEditor read Get_Editor write Set_Editor stored False;
property Version: WideString index 7 read GetWideStringProp write SetWideStringProp stored False;
property Cancel: WordBool index 8 read GetWordBoolProp write SetWordBoolProp stored False;
property OnClickOpt: TKDGrid2000ClickOpt read FOnClickOpt write FOnClickOpt;
property OnDblClickOpt: TKDGrid2000DblClickOpt read FOnDblClickOpt write FOnDblClickOpt;
property OnBlockOpt: TKDGrid2000BlockOpt read FOnBlockOpt write FOnBlockOpt;
property OnSelectChanged: TKDGrid2000SelectChanged read FOnSelectChanged write FOnSelectChanged;
property OnResizeOpt: TKDGrid2000ResizeOpt read FOnResizeOpt write FOnResizeOpt;
property OnScrollOpt: TKDGrid2000ScrollOpt read FOnScrollOpt write FOnScrollOpt;
property OnCellEdit: TKDGrid2000CellEdit read FOnCellEdit write FOnCellEdit;
property OnCellEditing: TKDGrid2000CellEditing read FOnCellEditing write FOnCellEditing;
end;
// *********************************************************************//
// The Class CoITSButton provides a Create and CreateRemote method to
// create instances of the default interface IITS_Button exposed by
// the CoClass ITSButton. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSButton = class
class function Create: IITS_Button;
class function CreateRemote(const MachineName: string): IITS_Button;
end;
// *********************************************************************//
// The Class CoITSEdit provides a Create and CreateRemote method to
// create instances of the default interface IITS_Edit exposed by
// the CoClass ITSEdit. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSEdit = class
class function Create: IITS_Edit;
class function CreateRemote(const MachineName: string): IITS_Edit;
end;
// *********************************************************************//
// The Class CoITSInteger provides a Create and CreateRemote method to
// create instances of the default interface IITS_Integer exposed by
// the CoClass ITSInteger. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSInteger = class
class function Create: IITS_Integer;
class function CreateRemote(const MachineName: string): IITS_Integer;
end;
// *********************************************************************//
// The Class CoITSFloat provides a Create and CreateRemote method to
// create instances of the default interface IITS_Float exposed by
// the CoClass ITSFloat. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSFloat = class
class function Create: IITS_Float;
class function CreateRemote(const MachineName: string): IITS_Float;
end;
// *********************************************************************//
// The Class CoITSCheckBox provides a Create and CreateRemote method to
// create instances of the default interface IITS_CheckBox exposed by
// the CoClass ITSCheckBox. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSCheckBox = class
class function Create: IITS_CheckBox;
class function CreateRemote(const MachineName: string): IITS_CheckBox;
end;
// *********************************************************************//
// The Class CoITSListBox provides a Create and CreateRemote method to
// create instances of the default interface IITS_ListBox exposed by
// the CoClass ITSListBox. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSListBox = class
class function Create: IITS_ListBox;
class function CreateRemote(const MachineName: string): IITS_ListBox;
end;
// *********************************************************************//
// The Class CoITSDate provides a Create and CreateRemote method to
// create instances of the default interface IITS_Date exposed by
// the CoClass ITSDate. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSDate = class
class function Create: IITS_Date;
class function CreateRemote(const MachineName: string): IITS_Date;
end;
// *********************************************************************//
// The Class CoITSAccount provides a Create and CreateRemote method to
// create instances of the default interface IITS_Account exposed by
// the CoClass ITSAccount. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSAccount = class
class function Create: IITS_Account;
class function CreateRemote(const MachineName: string): IITS_Account;
end;
// *********************************************************************//
// The Class CoITSTree provides a Create and CreateRemote method to
// create instances of the default interface IITS_Tree exposed by
// the CoClass ITSTree. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoITSTree = class
class function Create: IITS_Tree;
class function CreateRemote(const MachineName: string): IITS_Tree;
end;
procedure Register;
implementation
uses ComObj;
class function CoIFace.Create: IIFace;
begin
Result := CreateComObject(CLASS_IFace) as IIFace;
end;
class function CoIFace.CreateRemote(const MachineName: string): IIFace;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IFace) as IIFace;
end;
class function CoIRowInfo.Create: IIRowInfo;
begin
Result := CreateComObject(CLASS_IRowInfo) as IIRowInfo;
end;
class function CoIRowInfo.CreateRemote(const MachineName: string): IIRowInfo;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IRowInfo) as IIRowInfo;
end;
class function CoIRow.Create: IIRow;
begin
Result := CreateComObject(CLASS_IRow) as IIRow;
end;
class function CoIRow.CreateRemote(const MachineName: string): IIRow;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IRow) as IIRow;
end;
class function CoIColInfo.Create: IIColInfo;
begin
Result := CreateComObject(CLASS_IColInfo) as IIColInfo;
end;
class function CoIColInfo.CreateRemote(const MachineName: string): IIColInfo;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IColInfo) as IIColInfo;
end;
class function CoiCol.Create: IICol;
begin
Result := CreateComObject(CLASS_iCol) as IICol;
end;
class function CoiCol.CreateRemote(const MachineName: string): IICol;
begin
Result := CreateRemoteComObject(MachineName, CLASS_iCol) as IICol;
end;
class function CoIPrinter.Create: IIPrinter;
begin
Result := CreateComObject(CLASS_IPrinter) as IIPrinter;
end;
class function CoIPrinter.CreateRemote(const MachineName: string): IIPrinter;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IPrinter) as IIPrinter;
end;
class function CoIPrintHF.Create: IIPrintHF;
begin
Result := CreateComObject(CLASS_IPrintHF) as IIPrintHF;
end;
class function CoIPrintHF.CreateRemote(const MachineName: string): IIPrintHF;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IPrintHF) as IIPrintHF;
end;
class function CoIPrintRow.Create: IIPrintRow;
begin
Result := CreateComObject(CLASS_IPrintRow) as IIPrintRow;
end;
class function CoIPrintRow.CreateRemote(const MachineName: string): IIPrintRow;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IPrintRow) as IIPrintRow;
end;
class function CoIFile.Create: IIFile;
begin
Result := CreateComObject(CLASS_IFile) as IIFile;
end;
class function CoIFile.CreateRemote(const MachineName: string): IIFile;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IFile) as IIFile;
end;
class function CoIEditor.Create: IIEditor;
begin
Result := CreateComObject(CLASS_IEditor) as IIEditor;
end;
class function CoIEditor.CreateRemote(const MachineName: string): IIEditor;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IEditor) as IIEditor;
end;
class function CoICell.Create: IICell;
begin
Result := CreateComObject(CLASS_ICell) as IICell;
end;
class function CoICell.CreateRemote(const MachineName: string): IICell;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ICell) as IICell;
end;
class function CoIShowStyle.Create: IIShowStyle;
begin
Result := CreateComObject(CLASS_IShowStyle) as IIShowStyle;
end;
class function CoIShowStyle.CreateRemote(const MachineName: string): IIShowStyle;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IShowStyle) as IIShowStyle;
end;
class function CoIBorder.Create: IIBorder;
begin
Result := CreateComObject(CLASS_IBorder) as IIBorder;
end;
class function CoIBorder.CreateRemote(const MachineName: string): IIBorder;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IBorder) as IIBorder;
end;
procedure TKDGrid2000.InitControlData;
const
CEventDispIDs: array [0..7] of DWORD = (
$00000001, $00000002, $00000003, $00000004, $00000005, $00000006,
$00000007, $00000008);
CLicenseKey: array[0..26] of Word = ( $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020, $0028
, $0063, $0029, $0020, $0032, $0030, $0030, $0030, $0020, $004B, $0049
, $004E, $0047, $0044, $0045, $0045, $0000);
CTFontIDs: array [0..0] of DWORD = (
$FFFFFE00);
CControlData: TControlData2 = (
ClassID: '{72E0BC52-ADD3-11D3-B64C-0000EA77842F}';
EventIID: '{72E0BC51-ADD3-11D3-B64C-0000EA77842F}';
EventCount: 8;
EventDispIDs: @CEventDispIDs;
LicenseKey: @CLicenseKey;
Flags: $0000000F;
Version: 401;
FontCount: 1;
FontIDs: @CTFontIDs);
begin
ControlData := @CControlData;
TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnClickOpt) - Cardinal(Self);
end;
procedure TKDGrid2000.CreateControl;
proceduredo
Create;
begin
FIntf := IUnknown(OleObject) as _DKDGrid2000;
end;
begin
if FIntf = nil then
do
Create;
end;
function TKDGrid2000.GetControlInterface: _DKDGrid2000;
begin
CreateControl;
Result := FIntf;
end;
function TKDGrid2000.Get_Face: IFace;
begin
Result := DefaultInterface.Face;
end;
procedure TKDGrid2000.Set_Face(const Value: IFace);
begin
DefaultInterface.Face := Value;
end;
function TKDGrid2000.Get_Row: IRowInfo;
begin
Result := DefaultInterface.Row;
end;
procedure TKDGrid2000.Set_Row(const Value: IRowInfo);
begin
DefaultInterface.Row := Value;
end;
function TKDGrid2000.Get_Col: IColInfo;
begin
Result := DefaultInterface.Col;
end;
procedure TKDGrid2000.Set_Col(const Value: IColInfo);
begin
DefaultInterface.Col := Value;
end;
function TKDGrid2000.Get_Printer: IPrinter;
begin
Result := DefaultInterface.Printer;
end;
procedure TKDGrid2000.Set_Printer(const Value: IPrinter);
begin
DefaultInterface.Printer := Value;
end;
function TKDGrid2000.Get_File_: IFile;
begin
Result := DefaultInterface.File_;
end;
procedure TKDGrid2000.Set_File_(const Value: IFile);
begin
DefaultInterface.File_ := Value;
end;
function TKDGrid2000.Get_Editor: IEditor;
begin
Result := DefaultInterface.Editor;
end;
procedure TKDGrid2000.Set_Editor(const Value: IEditor);
begin
DefaultInterface.Editor := Value;
end;
function TKDGrid2000.Get_Cell(IRow: Integer;
iCol: Integer;
viRow2: OleVariant;
viCol2: OleVariant): ICell;
begin
Result := DefaultInterface.Cell(IRow, iCol, viRow2, viCol2);
end;
procedure TKDGrid2000.Set_Cell(IRow: Integer;
iCol: Integer;
viRow2: OleVariant;
viCol2: OleVariant;
const Param5: IDispatch);
begin
DefaultInterface.Cell(IRow, iCol, viRow2, viCol2):=Param5;
end;
function TKDGrid2000.Get_Switch(eSWID: KDGRID_Switch): WordBool;
begin
Result := DefaultInterface.Switch[eSWID];
end;
procedure TKDGrid2000.Set_Switch(eSWID: KDGRID_Switch;
Param2: WordBool);
begin
DefaultInterface.Switch[eSWID] := Param2;
end;
function TKDGrid2000.SetDim(iRows: Integer;
iCols: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.SetDim(iRows, iCols);
end;
function TKDGrid2000.InsertRow(IRow: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.InsertRow(IRow, EmptyParam);
end;
function TKDGrid2000.InsertRow(IRow: Integer;
viRows: OleVariant): KDGRID_OPT;
begin
Result := DefaultInterface.InsertRow(IRow, viRows);
end;
function TKDGrid2000.InsertCol(iCol: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.InsertCol(iCol, EmptyParam);
end;
function TKDGrid2000.InsertCol(iCol: Integer;
viCols: OleVariant): KDGRID_OPT;
begin
Result := DefaultInterface.InsertCol(iCol, viCols);
end;
function TKDGrid2000.DeleteRow(IRow: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.DeleteRow(IRow, EmptyParam);
end;
function TKDGrid2000.DeleteRow(IRow: Integer;
viRows: OleVariant): KDGRID_OPT;
begin
Result := DefaultInterface.DeleteRow(IRow, viRows);
end;
function TKDGrid2000.DeleteCol(iCol: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.DeleteCol(iCol, EmptyParam);
end;
function TKDGrid2000.DeleteCol(iCol: Integer;
viCols: OleVariant): KDGRID_OPT;
begin
Result := DefaultInterface.DeleteCol(iCol, viCols);
end;
function TKDGrid2000.GetSelect(var riRow: Integer;
var riCol: Integer;
var riRow2: Integer;
var riCol2: Integer): KDGRID_DEF;
begin
Result := DefaultInterface.GetSelect(riRow, riCol, riRow2, riCol2);
end;
function TKDGrid2000.SetSelect(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_DEF;
begin
Result := DefaultInterface.SetSelect(IRow, iCol, iRow2, iCol2);
end;
function TKDGrid2000.MergeBlock(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.MergeBlock(IRow, iCol, iRow2, iCol2);
end;
function TKDGrid2000.SplitBlock(IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer): KDGRID_OPT;
begin
Result := DefaultInterface.SplitBlock(IRow, iCol, iRow2, iCol2);
end;
function TKDGrid2000.TotalValue(eTotal: KDGRID_Total;
IRow: Integer;
iCol: Integer;
iRow2: Integer;
iCol2: Integer):do
uble;
begin
Result := DefaultInterface.TotalValue(eTotal, IRow, iCol, iRow2, iCol2);
end;
procedure TKDGrid2000.AboutBox;
begin
DefaultInterface.AboutBox;
end;
class function CoITSButton.Create: IITS_Button;
begin
Result := CreateComObject(CLASS_ITSButton) as IITS_Button;
end;
class function CoITSButton.CreateRemote(const MachineName: string): IITS_Button;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSButton) as IITS_Button;
end;
class function CoITSEdit.Create: IITS_Edit;
begin
Result := CreateComObject(CLASS_ITSEdit) as IITS_Edit;
end;
class function CoITSEdit.CreateRemote(const MachineName: string): IITS_Edit;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSEdit) as IITS_Edit;
end;
class function CoITSInteger.Create: IITS_Integer;
begin
Result := CreateComObject(CLASS_ITSInteger) as IITS_Integer;
end;
class function CoITSInteger.CreateRemote(const MachineName: string): IITS_Integer;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSInteger) as IITS_Integer;
end;
class function CoITSFloat.Create: IITS_Float;
begin
Result := CreateComObject(CLASS_ITSFloat) as IITS_Float;
end;
class function CoITSFloat.CreateRemote(const MachineName: string): IITS_Float;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSFloat) as IITS_Float;
end;
class function CoITSCheckBox.Create: IITS_CheckBox;
begin
Result := CreateComObject(CLASS_ITSCheckBox) as IITS_CheckBox;
end;
class function CoITSCheckBox.CreateRemote(const MachineName: string): IITS_CheckBox;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSCheckBox) as IITS_CheckBox;
end;
class function CoITSListBox.Create: IITS_ListBox;
begin
Result := CreateComObject(CLASS_ITSListBox) as IITS_ListBox;
end;
class function CoITSListBox.CreateRemote(const MachineName: string): IITS_ListBox;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSListBox) as IITS_ListBox;
end;
class function CoITSDate.Create: IITS_Date;
begin
Result := CreateComObject(CLASS_ITSDate) as IITS_Date;
end;
class function CoITSDate.CreateRemote(const MachineName: string): IITS_Date;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSDate) as IITS_Date;
end;
class function CoITSAccount.Create: IITS_Account;
begin
Result := CreateComObject(CLASS_ITSAccount) as IITS_Account;
end;
class function CoITSAccount.CreateRemote(const MachineName: string): IITS_Account;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSAccount) as IITS_Account;
end;
class function CoITSTree.Create: IITS_Tree;
begin
Result := CreateComObject(CLASS_ITSTree) as IITS_Tree;
end;
class function CoITSTree.CreateRemote(const MachineName: string): IITS_Tree;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ITSTree) as IITS_Tree;
end;
procedure Register;
begin
RegisterComponents('ActiveX',[TKDGrid2000]);
end;
end.