home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.3 / text / samples / DELPHI / TEXTDEMO / WINXTEXT.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1996-10-25  |  3.2 KB  |  91 lines

  1. unit WinXtext;
  2.  
  3. interface
  4.  
  5. uses Ole2, OleCtl, Classes, Graphics, OleCtrls;
  6.  
  7. type
  8.  
  9.   TText3D = class(TOleControl)
  10.   private
  11.   protected
  12.     procedure InitControlData; override;
  13.   public
  14.     procedure AboutBox; stdcall;
  15.   published
  16.     property ParentColor;
  17.     property ParentFont;
  18.     property DragCursor;
  19.     property DragMode;
  20.     property ParentShowHint;
  21.     property PopupMenu;
  22.     property ShowHint;
  23.     property TabOrder;
  24.     property Visible;
  25.     property OnDragDrop;
  26.     property OnDragOver;
  27.     property OnEndDrag;
  28.     property OnEnter;
  29.     property OnExit;
  30.     property OnStartDrag;
  31.     property OnMouseDown;
  32.     property OnMouseUp;
  33.     property Alignment: Smallint index 1 read GetSmallintProp write SetSmallintProp stored False;
  34.     property TextStyle: Smallint index 2 read GetSmallintProp write SetSmallintProp stored False;
  35.     property FrameStyle: Smallint index 3 read GetSmallintProp write SetSmallintProp stored False;
  36.     property FrameColor: Smallint index 4 read GetSmallintProp write SetSmallintProp stored False;
  37.     property OffsetHorizontal: Smallint index 5 read GetSmallintProp write SetSmallintProp stored False;
  38.     property OffsetVertical: Smallint index 6 read GetSmallintProp write SetSmallintProp stored False;
  39.     property BackColor: TColor index -501 read GetColorProp write SetColorProp stored False;
  40.     property HighlightColor: TColor index 7 read GetColorProp write SetColorProp stored False;
  41.     property FrameShadow: TOleBool index 8 read GetOleBoolProp write SetOleBoolProp stored False;
  42.     property ShadowColor: TColor index 9 read GetColorProp write SetColorProp stored False;
  43.     property Transparent: TOleBool index 10 read GetOleBoolProp write SetOleBoolProp stored False;
  44.     property TextOnFrame: TOleBool index 11 read GetOleBoolProp write SetOleBoolProp stored False;
  45.     property Font: Variant index -512 read GetVariantProp write SetVariantProp stored False;
  46.     property ForeColor: TColor index -513 read GetColorProp write SetColorProp stored False;
  47.     property Text: string index -517 read GetStringProp write SetStringProp stored False;
  48.   end;
  49.  
  50. procedure Register;
  51.  
  52. implementation
  53.  
  54. {$J+}
  55.  
  56. procedure TText3D.InitControlData;
  57. const
  58.   CLicenseKey: array[0..53] of Word = (
  59.     $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020,
  60.     $0028, $0063, $0029, $0020, $0031, $0039, $0039, $0036, $002E, $0020,
  61.     $0050, $0072, $006F, $0074, $006F, $0056, $0069, $0065, $0077, $0020,
  62.     $0044, $0065, $0076, $0065, $006C, $006F, $0070, $006D, $0065, $006E,
  63.     $0074, $002E, $0020, $0030, $0078, $0030, $0030, $0066, $0030, $0030,
  64.     $0066, $0030, $0066, $0000);
  65.   CControlData: TControlData = (
  66.     ClassID: (
  67.       D1:$03D0BCC3;D2:$25EE;D3:$11D0;D4:($BD,$CB,$00,$20,$A9,$0B,$18,$3A));
  68.     EventIID: (
  69.       D1:$03D0BCC2;D2:$25EE;D3:$11D0;D4:($BD,$CB,$00,$20,$A9,$0B,$18,$3A));
  70.     EventCount: 0;
  71.     EventDispIDs: nil;
  72.     LicenseKey: @CLicenseKey;
  73.     Flags: $00000027);
  74. begin
  75.   ControlData := @CControlData;
  76. end;
  77.  
  78. procedure TText3D.AboutBox;
  79. const
  80.   DispInfo: array[0..7] of Byte = ($D8,$FD,$FF,$FF,$00,$01,$00,$00);
  81. begin
  82.   InvokeMethod(DispInfo, nil);
  83. end;
  84.  
  85. procedure Register;
  86. begin
  87.   RegisterComponents('OCX', [TText3D]);
  88. end;
  89.  
  90. end.
  91.