📄 tchmoneyproj1_tlb.pas
字号:
property AxBorderStyle: TxActiveFormBorderStyle dispid 204;
property Caption: WideString dispid -518;
property Color: OLE_COLOR dispid -501;
property Font: IFontDisp dispid -512;
property KeyPreview: WordBool dispid 205;
property PixelsPerInch: Integer dispid 206;
property PrintScale: TxPrintScale dispid 207;
property Scaled: WordBool dispid 208;
property Active: WordBool readonly dispid 209;
property DropTarget: WordBool dispid 210;
property HelpFile: WideString dispid 211;
property ScreenSnap: WordBool dispid 212;
property SnapBuffer: Integer dispid 213;
property DoubleBuffered: WordBool dispid 214;
property AlignDisabled: WordBool readonly dispid 215;
property VisibleDockClientCount: Integer readonly dispid 216;
property Enabled: WordBool dispid -514;
procedure AboutBox; dispid -552;
property Money: Single dispid 217;
end;
// *********************************************************************//
// DispIntf: ITChMoneyEvents
// Flags: (4096) Dispatchable
// GUID: {03AE5B9E-5E85-422B-97C4-1C708D4280C6}
// *********************************************************************//
ITChMoneyEvents = dispinterface
['{03AE5B9E-5E85-422B-97C4-1C708D4280C6}']
procedure OnActivate; dispid 201;
procedure OnClick; dispid 202;
procedure OnCreate; dispid 203;
procedure OnDblClick; dispid 204;
procedure OnDestroy; dispid 205;
procedure OnDeactivate; dispid 206;
procedure OnKeyPress(var Key: Smallint); dispid 207;
procedure OnPaint; dispid 208;
end;
// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name : TTChMoney
// Help String : TChMoney Control
// Default Interface: ITChMoney
// Def. Intf. DISP? : No
// Event Interface: ITChMoneyEvents
// TypeFlags : (38) CanCreate Licensed Control
// *********************************************************************//
TTChMoneyOnKeyPress = procedure(ASender: TObject; var Key: Smallint) of object;
TTChMoney = class(TOleControl)
private
FOnActivate: TNotifyEvent;
FOnClick: TNotifyEvent;
FOnCreate: TNotifyEvent;
FOnDblClick: TNotifyEvent;
FOnDestroy: TNotifyEvent;
FOnDeactivate: TNotifyEvent;
FOnKeyPress: TTChMoneyOnKeyPress;
FOnPaint: TNotifyEvent;
FIntf: ITChMoney;
function GetControlInterface: ITChMoney;
protected
procedure CreateControl;
procedure InitControlData; override;
public
procedure AboutBox;
property ControlInterface: ITChMoney read GetControlInterface;
property DefaultInterface: ITChMoney read GetControlInterface;
property Visible: WordBool index 201 read GetWordBoolProp write SetWordBoolProp;
property Active: WordBool index 209 read GetWordBoolProp;
property DropTarget: WordBool index 210 read GetWordBoolProp write SetWordBoolProp;
property HelpFile: WideString index 211 read GetWideStringProp write SetWideStringProp;
property ScreenSnap: WordBool index 212 read GetWordBoolProp write SetWordBoolProp;
property SnapBuffer: Integer index 213 read GetIntegerProp write SetIntegerProp;
property DoubleBuffered: WordBool index 214 read GetWordBoolProp write SetWordBoolProp;
property AlignDisabled: WordBool index 215 read GetWordBoolProp;
property VisibleDockClientCount: Integer index 216 read GetIntegerProp;
property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp;
published
property Anchors;
property ParentColor;
property ParentFont;
property Align;
property DragCursor;
property DragMode;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property AutoScroll: WordBool index 202 read GetWordBoolProp write SetWordBoolProp stored False;
property AutoSize: WordBool index 203 read GetWordBoolProp write SetWordBoolProp stored False;
property AxBorderStyle: TOleEnum index 204 read GetTOleEnumProp write SetTOleEnumProp stored False;
property Caption: WideString index -518 read GetWideStringProp write SetWideStringProp stored False;
property Color: TColor index -501 read GetTColorProp write SetTColorProp stored False;
property Font: TFont index -512 read GetTFontProp write SetTFontProp stored False;
property KeyPreview: WordBool index 205 read GetWordBoolProp write SetWordBoolProp stored False;
property PixelsPerInch: Integer index 206 read GetIntegerProp write SetIntegerProp stored False;
property PrintScale: TOleEnum index 207 read GetTOleEnumProp write SetTOleEnumProp stored False;
property Scaled: WordBool index 208 read GetWordBoolProp write SetWordBoolProp stored False;
property Money: Single index 217 read GetSingleProp write SetSingleProp stored False;
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate;
property OnClick: TNotifyEvent read FOnClick write FOnClick;
property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
property OnDblClick: TNotifyEvent read FOnDblClick write FOnDblClick;
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate;
property OnKeyPress: TTChMoneyOnKeyPress read FOnKeyPress write FOnKeyPress;
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
end;
procedure Register;
resourcestring
dtlServerPage = 'Post';
dtlOcxPage = 'Post';
implementation
uses ComObj;
procedure TTChMoney.InitControlData;
const
CEventDispIDs: array [0..7] of DWORD = (
$000000C9, $000000CA, $000000CB, $000000CC, $000000CD, $000000CE,
$000000CF, $000000D0);
CLicenseKey: array[0..38] of Word = ( $007B, $0044, $0045, $0035, $0036, $0045, $0037, $0041, $0035, $002D, $0038
, $0044, $0034, $0031, $002D, $0034, $0032, $0037, $0037, $002D, $0039
, $0035, $0036, $0031, $002D, $0034, $0038, $0034, $0042, $0039, $0030
, $0038, $0034, $0031, $0043, $0031, $0034, $007D, $0000);
CTFontIDs: array [0..0] of DWORD = (
$FFFFFE00);
CControlData: TControlData2 = (
ClassID: '{038557FF-C605-4A83-BCB9-9D6FBAFF2DE8}';
EventIID: '{03AE5B9E-5E85-422B-97C4-1C708D4280C6}';
EventCount: 8;
EventDispIDs: @CEventDispIDs;
LicenseKey: @CLicenseKey;
Flags: $0000001D;
Version: 401;
FontCount: 1;
FontIDs: @CTFontIDs);
begin
ControlData := @CControlData;
TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnActivate) - Cardinal(Self);
end;
procedure TTChMoney.CreateControl;
procedure DoCreate;
begin
FIntf := IUnknown(OleObject) as ITChMoney;
end;
begin
if FIntf = nil then DoCreate;
end;
function TTChMoney.GetControlInterface: ITChMoney;
begin
CreateControl;
Result := FIntf;
end;
procedure TTChMoney.AboutBox;
begin
DefaultInterface.AboutBox;
end;
procedure Register;
begin
RegisterComponents(dtlOcxPage, [TTChMoney]);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -