CSDN博客

img w68j17

Delphi使用VB6编写的ActiveX控件???

发表于2004/6/11 15:48:00  453人阅读

以下是我在VB6编写的ActiveX控件wjprnview.ocx,注册并导入Delphi5的开发环境后,Delphi生成的wjprnview_TLB.pas文件,其没有生成Twjprnview类,也没有注册面板上,无法使用,请问有方法吗?

unit wjprnview_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.1.0.1.0  $
// File generated on 2004-06-11 14:04:44 from Type Library described below.

// ************************************************************************ //
// Type Lib: E:/R95/wjprnview.ocx (1)
// IID/LCID: {D72F975E-72DC-11D6-923D-00E04CE8FBA7}/0
// Helpfile:
// DepndLst:
//   (1) v2.0 stdole, (C:/WINNT/system32/stdole2.tlb)
//   (2) v4.0 StdVCL, (C:/WINNT/system32/STDVCL40.DLL)
// ************************************************************************ //
{$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
  wjprnviewMajorVersion = 29;
  wjprnviewMinorVersion = 0;

  LIBID_wjprnview: TGUID = '{D72F975E-72DC-11D6-923D-00E04CE8FBA7}';

  IID__prnview: TGUID = '{18CF3D27-3867-425A-BCE2-C754EE5FFE5A}';
  DIID___prnview: TGUID = '{A47CD1BA-2E3A-4DCC-BE25-EA98C08DD135}';
  CLASS_prnview: TGUID = '{D72F9760-72DC-11D6-923D-00E04CE8FBA7}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                   
// *********************************************************************//
  _prnview = interface;
  _prnviewDisp = dispinterface;
  __prnview = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                      
// (NOTE: Here we map each CoClass to its Default Interface)             
// *********************************************************************//
  prnview = _prnview;


// *********************************************************************//
// Interface: _prnview
// Flags:     (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID:      {18CF3D27-3867-425A-BCE2-C754EE5FFE5A}
// *********************************************************************//
  _prnview = interface(IDispatch)
    ['{18CF3D27-3867-425A-BCE2-C754EE5FFE5A}']
    procedure PsetA(var X: OleVariant; var Y: OleVariant; var color: OleVariant); safecall;
    function  TextWidth(var str: WideString): Single; safecall;
    function  TextHeight(var str: WideString): Single; safecall;
    procedure PaintPicture(var pic: IDispatch; var pLeft: OleVariant; var pTop: OleVariant;
                           var pWidth: OleVariant; var pHeight: OleVariant); safecall;
    procedure Refresh; safecall;
    procedure StartDoc(zm: OleVariant; Pw: OleVariant; Ph: OleVariant); safecall;
    function  Get_DrawWidth: OleVariant; safecall;
    procedure Set_DrawWidth(var Param1: OleVariant); safecall;
    function  Get_CurrentX: Single; safecall;
    procedure Set_CurrentX(Param1: Single); safecall;
    function  Get_CurrentY: Single; safecall;
    procedure Set_CurrentY(Param1: Single); safecall;
    function  Get_BackColor: OLE_COLOR; safecall;
    procedure Set_BackColor(Param1: OLE_COLOR); safecall;
    function  Get_ForeColor: OLE_COLOR; safecall;
    procedure Set_ForeColor(Param1: OLE_COLOR); safecall;
    function  Get_Font: IFontDisp; safecall;
    procedure Set_Font(const Param1: IFontDisp); safecall;
    procedure Set_FontName(var Param1: OleVariant); safecall;
    procedure Set_FontSize(var Param1: OleVariant); safecall;
    procedure Set_FontBold(var Param1: OleVariant); safecall;
    procedure Set_FontItalic(var Param1: OleVariant); safecall;
    function  Get_PaperWidth: Single; safecall;
    procedure Set_PaperWidth(var Param1: Single); safecall;
    function  Get_PaperHeight: Single; safecall;
    procedure Set_PaperHeight(var Param1: Single); safecall;
    function  Get_ScaleHeight: Single; safecall;
    procedure Set_ScaleHeight(Param1: Single); safecall;
    function  Get_ScaleWidth: Single; safecall;
    procedure Set_ScaleWidth(Param1: Single); safecall;
    procedure CircleA(var bLeft: OleVariant; var bTop: OleVariant; var bRadius: OleVariant); safecall;
    procedure PrintA(var PrintVar: OleVariant); safecall;
    procedure BoxA(var bLeft: OleVariant; var bTop: OleVariant; var bLeft1: OleVariant;
                   var bTop1: OleVariant); safecall;
    procedure BoxF(var bLeft: OleVariant; var bTop: OleVariant; var bLeft1: OleVariant;
                   var bTop1: OleVariant; var color: OleVariant); safecall;
    procedure LineA(var bLeft: OleVariant; var bTop: OleVariant; var bLeft1: OleVariant;
                    var bTop1: OleVariant); safecall;
    procedure Cls; safecall;
    function  Get_DrawStyle: Smallint; safecall;
    procedure Set_DrawStyle(Param1: Smallint); safecall;
    function  Get_DrawMode: Smallint; safecall;
    procedure Set_DrawMode(Param1: Smallint); safecall;
    function  Get_FontStrikethru: WordBool; safecall;
    procedure Set_FontStrikethru(Param1: WordBool); safecall;
    function  Get_FontUnderline: WordBool; safecall;
    procedure Set_FontUnderline(Param1: WordBool); safecall;
    property DrawWidth: OleVariant read Get_DrawWidth write Set_DrawWidth;
    property CurrentX: Single read Get_CurrentX write Set_CurrentX;
    property CurrentY: Single read Get_CurrentY write Set_CurrentY;
    property BackColor: OLE_COLOR read Get_BackColor write Set_BackColor;
    property ForeColor: OLE_COLOR read Get_ForeColor write Set_ForeColor;
    property Font: IFontDisp read Get_Font write Set_Font;
    property FontName: OleVariant write Set_FontName;
    property FontSize: OleVariant write Set_FontSize;
    property FontBold: OleVariant write Set_FontBold;
    property FontItalic: OleVariant write Set_FontItalic;
    property PaperWidth: Single read Get_PaperWidth write Set_PaperWidth;
    property PaperHeight: Single read Get_PaperHeight write Set_PaperHeight;
    property ScaleHeight: Single read Get_ScaleHeight write Set_ScaleHeight;
    property ScaleWidth: Single read Get_ScaleWidth write Set_ScaleWidth;
    property DrawStyle: Smallint read Get_DrawStyle write Set_DrawStyle;
    property DrawMode: Smallint read Get_DrawMode write Set_DrawMode;
    property FontStrikethru: WordBool read Get_FontStrikethru write Set_FontStrikethru;
    property FontUnderline: WordBool read Get_FontUnderline write Set_FontUnderline;
  end;

// *********************************************************************//
// DispIntf:  _prnviewDisp
// Flags:     (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID:      {18CF3D27-3867-425A-BCE2-C754EE5FFE5A}
// *********************************************************************//
  _prnviewDisp = dispinterface
    ['{18CF3D27-3867-425A-BCE2-C754EE5FFE5A}']
    procedure PsetA(var X: OleVariant; var Y: OleVariant; var color: OleVariant); dispid 1610809362;
    function  TextWidth(var str: WideString): Single; dispid 1610809363;
    function  TextHeight(var str: WideString): Single; dispid 1610809364;
    procedure PaintPicture(var pic: IDispatch; var pLeft: OleVariant; var pTop: OleVariant;
                           var pWidth: OleVariant; var pHeight: OleVariant); dispid 1610809365;
    procedure Refresh; dispid 1610809366;
    procedure StartDoc(zm: OleVariant; Pw: OleVariant; Ph: OleVariant); dispid 1610809367;
    property DrawWidth: OleVariant dispid 1745027089;
    property CurrentX: Single dispid 1745027088;
    property CurrentY: Single dispid 1745027087;
    property BackColor: OLE_COLOR dispid 1745027086;
    property ForeColor: OLE_COLOR dispid 1745027085;
    property Font: IFontDisp dispid 1745027084;
    property FontName: OleVariant writeonly dispid 1745027083;
    property FontSize: OleVariant writeonly dispid 1745027082;
    property FontBold: OleVariant writeonly dispid 1745027081;
    property FontItalic: OleVariant writeonly dispid 1745027080;
    property PaperWidth: Single dispid 1745027079;
    property PaperHeight: Single dispid 1745027078;
    property ScaleHeight: Single dispid 1745027077;
    property ScaleWidth: Single dispid 1745027076;
    procedure CircleA(var bLeft: OleVariant; var bTop: OleVariant; var bRadius: OleVariant); dispid 1610809369;
    procedure PrintA(var PrintVar: OleVariant); dispid 1610809370;
    procedure BoxA(var bLeft: OleVariant; var bTop: OleVariant; var bLeft1: OleVariant;
                   var bTop1: OleVariant); dispid 1610809371;
    procedure BoxF(var bLeft: OleVariant; var bTop: OleVariant; var bLeft1: OleVariant;
                   var bTop1: OleVariant; var color: OleVariant); dispid 1610809372;
    procedure LineA(var bLeft: OleVariant; var bTop: OleVariant; var bLeft1: OleVariant;
                    var bTop1: OleVariant); dispid 1610809373;
    procedure Cls; dispid 1610809376;
    property DrawStyle: Smallint dispid 1745027075;
    property DrawMode: Smallint dispid 1745027074;
    property FontStrikethru: WordBool dispid 1745027073;
    property FontUnderline: WordBool dispid 1745027072;
  end;

// *********************************************************************//
// DispIntf:  __prnview
// Flags:     (4240) Hidden NonExtensible Dispatchable
// GUID:      {A47CD1BA-2E3A-4DCC-BE25-EA98C08DD135}
// *********************************************************************//
  __prnview = dispinterface
    ['{A47CD1BA-2E3A-4DCC-BE25-EA98C08DD135}']
    procedure MouseMove(var Button: Smallint; var Shift: Smallint; var X: Single; var Y: Single); dispid 1;
    procedure MouseUp(var Button: Smallint; var Shift: Smallint; var X: Single; var Y: Single); dispid 2;
    procedure MouseDown(var Button: Smallint; var Shift: Smallint; var X: Single; var Y: Single); dispid 3;
    procedure Click; dispid 4;
  end;

implementation

uses ComObj;

end.

阅读全文
0 0

相关文章推荐

img
取 消
img