📄 iwdnprinterproj_tlb.pas~
字号:
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;
procedure OpenData(const sConn: WideString; const sSQL: WideString); dispid 217;
procedure TestData; dispid 218;
property pone: {??POleVariant1}OleVariant dispid 219;
end;
// *********************************************************************//
// DispIntf: IIWDNPrinterEvents
// Flags: (4096) Dispatchable
// GUID: {B7D1D5EB-D466-4650-A9F9-F1335852614F}
// *********************************************************************//
IIWDNPrinterEvents = dispinterface
['{B7D1D5EB-D466-4650-A9F9-F1335852614F}']
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 : TIWDNPrinter
// Help String : IWDNPrinter Control
// Default Interface: IIWDNPrinter
// Def. Intf. DISP? : No
// Event Interface: IIWDNPrinterEvents
// TypeFlags : (34) CanCreate Control
// *********************************************************************//
TIWDNPrinterOnKeyPress = procedure(ASender: TObject; var Key: Smallint) of object;
TIWDNPrinter = class(TOleControl)
private
FOnActivate: TNotifyEvent;
FOnClick: TNotifyEvent;
FOnCreate: TNotifyEvent;
FOnDblClick: TNotifyEvent;
FOnDestroy: TNotifyEvent;
FOnDeactivate: TNotifyEvent;
FOnKeyPress: TIWDNPrinterOnKeyPress;
FOnPaint: TNotifyEvent;
FIntf: IIWDNPrinter;
function GetControlInterface: IIWDNPrinter;
protected
procedure CreateControl;
procedure InitControlData; override;
public
procedure AboutBox;
procedure OpenData(const sConn: WideString; const sSQL: WideString);
procedure TestData;
property ControlInterface: IIWDNPrinter read GetControlInterface;
property DefaultInterface: IIWDNPrinter 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 pone: OleVariant index 219 read GetOleVariantProp write SetOleVariantProp 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: TIWDNPrinterOnKeyPress read FOnKeyPress write FOnKeyPress;
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
end;
procedure Register;
resourcestring
dtlServerPage = 'Servers';
dtlOcxPage = 'ActiveX';
implementation
uses ComObj;
procedure TIWDNPrinter.InitControlData;
const
CEventDispIDs: array [0..7] of DWORD = (
$000000C9, $000000CA, $000000CB, $000000CC, $000000CD, $000000CE,
$000000CF, $000000D0);
CTFontIDs: array [0..0] of DWORD = (
$FFFFFE00);
CControlData: TControlData2 = (
ClassID: '{01118D08-C075-40C6-AF17-8A8611E8CBE2}';
EventIID: '{B7D1D5EB-D466-4650-A9F9-F1335852614F}';
EventCount: 8;
EventDispIDs: @CEventDispIDs;
LicenseKey: nil (*HR:$00000000*);
Flags: $0000001D;
Version: 401;
FontCount: 1;
FontIDs: @CTFontIDs);
begin
ControlData := @CControlData;
TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnActivate) - Cardinal(Self);
end;
procedure TIWDNPrinter.CreateControl;
procedure DoCreate;
begin
FIntf := IUnknown(OleObject) as IIWDNPrinter;
end;
begin
if FIntf = nil then DoCreate;
end;
function TIWDNPrinter.GetControlInterface: IIWDNPrinter;
begin
CreateControl;
Result := FIntf;
end;
procedure TIWDNPrinter.AboutBox;
begin
DefaultInterface.AboutBox;
end;
procedure TIWDNPrinter.OpenData(const sConn: WideString; const sSQL: WideString);
begin
DefaultInterface.OpenData(sConn, sSQL);
end;
procedure TIWDNPrinter.TestData;
begin
DefaultInterface.TestData;
end;
procedure Register;
begin
RegisterComponents(dtlOcxPage, [TIWDNPrinter]);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -