⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 micdtmfboximpl1.pas

📁 Fontes e exemplos CALLER ID DELPHI
💻 PAS
📖 第 1 页 / 共 2 页
字号:
unit micDTMFBoxImpl1;

{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
  ComServ, StdVCL, AXCtrls, micDTMFBoCx_TLB, micDTMFBox;

type
  TmicDTMFBoxX = class(TActiveXControl, ImicDTMFBoxX)
  private
    { Private declarations }
    FDelphiControl: TmicDTMFBox;
    FEvents: ImicDTMFBoxXEvents;
    procedure a1DetectAllEvent(Sender: TObject; AllDigits: String);
    procedure a2DetectDigitEvent(Sender: TObject; LastDigit: String);
    procedure a3FormatPhoneEvent(Sender: TObject; Tipo, DDD, Fone,
      IndexPhone: String);
    procedure a4LevelSignalEvent(Sender: TObject; Signal: Integer);
    procedure a5HandShakeEvent(Sender: TObject; HandShake: Boolean);
    procedure a6SilenDetectEvent(Sender: TObject; Secounds: Integer);
    procedure a7IndexFoneEvent(Sender: TObject; IndexFone: String);
    procedure a8MicAPIConectEvent(Sender: TObject; PlugInHandle: Integer);
    procedure ChangeEvent(Sender: TObject);
    procedure ClickEvent(Sender: TObject);
    procedure CloseUpEvent(Sender: TObject);
    procedure DblClickEvent(Sender: TObject);
    procedure DropDownEvent(Sender: TObject);
    procedure KeyPressEvent(Sender: TObject; var Key: Char);
    procedure SelectEvent(Sender: TObject);
  protected
    { Protected declarations }
    procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
    procedure EventSinkChanged(const EventSink: IUnknown); override;
    procedure InitializeControl; override;
    function DrawTextBiDiModeFlagsReadingOnly: Integer; safecall;
    function Get_a1Active: WordBool; safecall;
    function Get_a2DDDLocal: WideString; safecall;
    function Get_a3RootPlugIn: WideString; safecall;
    function Get_a4PlugInRegistry: WideString; safecall;
    function Get_a5ClearAllDigits: WideString; safecall;
    function Get_a6ModoOperac: TxModOper; safecall;
    function Get_a7ScreenRestore: WordBool; safecall;
    function Get_a8Sensibility: Integer; safecall;
    function Get_a9NotDetectTipo: WordBool; safecall;
    function Get_AlignDisabled: WordBool; safecall;
    function Get_AutoCloseUp: WordBool; safecall;
    function Get_AutoComplete: WordBool; safecall;
    function Get_AutoDropDown: WordBool; safecall;
    function Get_BevelInner: TxBevelCut; safecall;
    function Get_BevelKind: TxBevelKind; safecall;
    function Get_BevelOuter: TxBevelCut; safecall;
    function Get_CharCase: TxEditCharCase; safecall;
    function Get_Color: OLE_COLOR; safecall;
    function Get_Ctl3D: WordBool; safecall;
    function Get_DoubleBuffered: WordBool; safecall;
    function Get_DragCursor: Smallint; safecall;
    function Get_DragMode: TxDragMode; safecall;
    function Get_DropDownCount: Integer; safecall;
    function Get_DroppedDown: WordBool; safecall;
    function Get_Enabled: WordBool; safecall;
    function Get_Font: IFontDisp; safecall;
    function Get_ImeMode: TxImeMode; safecall;
    function Get_ImeName: WideString; safecall;
    function Get_ItemHeight: Integer; safecall;
    function Get_ItemIndex: Integer; safecall;
    function Get_Items: IStrings; safecall;
    function Get_MaxLength: Integer; safecall;
    function Get_ParentColor: WordBool; safecall;
    function Get_ParentCtl3D: WordBool; safecall;
    function Get_SelLength: Integer; safecall;
    function Get_SelStart: Integer; safecall;
    function Get_SelText: WideString; safecall;
    function Get_Sorted: WordBool; safecall;
    function Get_Style: TxComboBoxStyle; safecall;
    function Get_Text: WideString; safecall;
    function Get_Visible: WordBool; safecall;
    function Get_VisibleDockClientCount: Integer; safecall;
    function Initiate: WordBool; safecall;
    function IsRightToLeft: WordBool; safecall;
    function micDTMFactive: WordBool; safecall;
    function Stop: WordBool; safecall;
    function UseRightToLeftReading: WordBool; safecall;
    function UseRightToLeftScrollBar: WordBool; safecall;
    procedure _Set_Font(var Value: IFontDisp); safecall;
    procedure Clear; safecall;
    procedure ClearAll; safecall;
    procedure ClearSelection; safecall;
    procedure DeleteSelected; safecall;
    procedure HideDlg; safecall;
    procedure InitiateAction; safecall;
    procedure SelectAll; safecall;
    procedure Set_a1Active(Value: WordBool); safecall;
    procedure Set_a2DDDLocal(const Value: WideString); safecall;
    procedure Set_a3RootPlugIn(const Value: WideString); safecall;
    procedure Set_a4PlugInRegistry(const Value: WideString); safecall;
    procedure Set_a5ClearAllDigits(const Value: WideString); safecall;
    procedure Set_a6ModoOperac(Value: TxModOper); safecall;
    procedure Set_a7ScreenRestore(Value: WordBool); safecall;
    procedure Set_a8Sensibility(Value: Integer); safecall;
    procedure Set_a9NotDetectTipo(Value: WordBool); safecall;
    procedure Set_AutoCloseUp(Value: WordBool); safecall;
    procedure Set_AutoComplete(Value: WordBool); safecall;
    procedure Set_AutoDropDown(Value: WordBool); safecall;
    procedure Set_BevelInner(Value: TxBevelCut); safecall;
    procedure Set_BevelKind(Value: TxBevelKind); safecall;
    procedure Set_BevelOuter(Value: TxBevelCut); safecall;
    procedure Set_CharCase(Value: TxEditCharCase); safecall;
    procedure Set_Color(Value: OLE_COLOR); safecall;
    procedure Set_Ctl3D(Value: WordBool); safecall;
    procedure Set_DoubleBuffered(Value: WordBool); safecall;
    procedure Set_DragCursor(Value: Smallint); safecall;
    procedure Set_DragMode(Value: TxDragMode); safecall;
    procedure Set_DropDownCount(Value: Integer); safecall;
    procedure Set_DroppedDown(Value: WordBool); safecall;
    procedure Set_Enabled(Value: WordBool); safecall;
    procedure Set_Font(const Value: IFontDisp); safecall;
    procedure Set_ImeMode(Value: TxImeMode); safecall;
    procedure Set_ImeName(const Value: WideString); safecall;
    procedure Set_ItemHeight(Value: Integer); safecall;
    procedure Set_ItemIndex(Value: Integer); safecall;
    procedure Set_Items(const Value: IStrings); safecall;
    procedure Set_MaxLength(Value: Integer); safecall;
    procedure Set_ParentColor(Value: WordBool); safecall;
    procedure Set_ParentCtl3D(Value: WordBool); safecall;
    procedure Set_SelLength(Value: Integer); safecall;
    procedure Set_SelStart(Value: Integer); safecall;
    procedure Set_SelText(const Value: WideString); safecall;
    procedure Set_Sorted(Value: WordBool); safecall;
    procedure Set_Style(Value: TxComboBoxStyle); safecall;
    procedure Set_Text(const Value: WideString); safecall;
    procedure Set_Visible(Value: WordBool); safecall;
    procedure SetSubComponent(IsSubComponent: WordBool); safecall;
    procedure ShowDlg; safecall;
    procedure TestNotTipo(const Valor: WideString); safecall;
  end;

implementation

uses ComObj;

{ TmicDTMFBoxX }

procedure TmicDTMFBoxX.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
begin
  {TODO: Define property pages here.  Property pages are defined by calling
    DefinePropertyPage with the class id of the page.  For example,
      DefinePropertyPage(Class_micDTMFBoxXPage); }
end;

procedure TmicDTMFBoxX.EventSinkChanged(const EventSink: IUnknown);
begin
  FEvents := EventSink as ImicDTMFBoxXEvents;
end;

procedure TmicDTMFBoxX.InitializeControl;
begin
  FDelphiControl := Control as TmicDTMFBox;
  FDelphiControl.a1DetectAll := a1DetectAllEvent;
  FDelphiControl.a2DetectDigit := a2DetectDigitEvent;
  FDelphiControl.a3FormatPhone := a3FormatPhoneEvent;
  FDelphiControl.a4LevelSignal := a4LevelSignalEvent;
  FDelphiControl.a5HandShake := a5HandShakeEvent;
  FDelphiControl.a6SilenDetect := a6SilenDetectEvent;
  FDelphiControl.a7IndexFone := a7IndexFoneEvent;
  FDelphiControl.a8MicAPIConect := a8MicAPIConectEvent;
  FDelphiControl.OnChange := ChangeEvent;
  FDelphiControl.OnClick := ClickEvent;
  FDelphiControl.OnCloseUp := CloseUpEvent;
  FDelphiControl.OnDblClick := DblClickEvent;
  FDelphiControl.OnDropDown := DropDownEvent;
  FDelphiControl.OnKeyPress := KeyPressEvent;
  FDelphiControl.OnSelect := SelectEvent;
end;

function TmicDTMFBoxX.DrawTextBiDiModeFlagsReadingOnly: Integer;
begin
  Result := FDelphiControl.DrawTextBiDiModeFlagsReadingOnly;
end;

function TmicDTMFBoxX.Get_a1Active: WordBool;
begin
  Result := FDelphiControl.a1Active;
end;

function TmicDTMFBoxX.Get_a2DDDLocal: WideString;
begin
  Result := WideString(FDelphiControl.a2DDDLocal);
end;

function TmicDTMFBoxX.Get_a3RootPlugIn: WideString;
begin
  Result := WideString(FDelphiControl.a3RootPlugIn);
end;

function TmicDTMFBoxX.Get_a4PlugInRegistry: WideString;
begin
  Result := WideString(FDelphiControl.a4PlugInRegistry);
end;

function TmicDTMFBoxX.Get_a5ClearAllDigits: WideString;
begin
  Result := WideString(FDelphiControl.a5ClearAllDigits);
end;

function TmicDTMFBoxX.Get_a6ModoOperac: TxModOper;
begin
  Result := Ord(FDelphiControl.a6ModoOperac);
end;

function TmicDTMFBoxX.Get_a7ScreenRestore: WordBool;
begin
  Result := FDelphiControl.a7ScreenRestore;
end;

function TmicDTMFBoxX.Get_a8Sensibility: Integer;
begin
  Result := FDelphiControl.a8Sensibility;
end;

function TmicDTMFBoxX.Get_a9NotDetectTipo: WordBool;
begin
  Result := FDelphiControl.a9NotDetectTipo;
end;

function TmicDTMFBoxX.Get_AlignDisabled: WordBool;
begin
  Result := FDelphiControl.AlignDisabled;
end;

function TmicDTMFBoxX.Get_AutoCloseUp: WordBool;
begin
  Result := FDelphiControl.AutoCloseUp;
end;

function TmicDTMFBoxX.Get_AutoComplete: WordBool;
begin
  Result := FDelphiControl.AutoComplete;
end;

function TmicDTMFBoxX.Get_AutoDropDown: WordBool;
begin
  Result := FDelphiControl.AutoDropDown;
end;

function TmicDTMFBoxX.Get_BevelInner: TxBevelCut;
begin
  Result := Ord(FDelphiControl.BevelInner);
end;

function TmicDTMFBoxX.Get_BevelKind: TxBevelKind;
begin
  Result := Ord(FDelphiControl.BevelKind);
end;

function TmicDTMFBoxX.Get_BevelOuter: TxBevelCut;
begin
  Result := Ord(FDelphiControl.BevelOuter);
end;

function TmicDTMFBoxX.Get_CharCase: TxEditCharCase;
begin
  Result := Ord(FDelphiControl.CharCase);
end;

function TmicDTMFBoxX.Get_Color: OLE_COLOR;
begin
  Result := OLE_COLOR(FDelphiControl.Color);
end;

function TmicDTMFBoxX.Get_Ctl3D: WordBool;
begin
  Result := FDelphiControl.Ctl3D;
end;

function TmicDTMFBoxX.Get_DoubleBuffered: WordBool;
begin
  Result := FDelphiControl.DoubleBuffered;
end;

function TmicDTMFBoxX.Get_DragCursor: Smallint;
begin
  Result := Smallint(FDelphiControl.DragCursor);
end;

function TmicDTMFBoxX.Get_DragMode: TxDragMode;
begin
  Result := Ord(FDelphiControl.DragMode);
end;

function TmicDTMFBoxX.Get_DropDownCount: Integer;
begin
  Result := FDelphiControl.DropDownCount;
end;

function TmicDTMFBoxX.Get_DroppedDown: WordBool;
begin
  Result := FDelphiControl.DroppedDown;
end;

function TmicDTMFBoxX.Get_Enabled: WordBool;
begin
  Result := FDelphiControl.Enabled;
end;

function TmicDTMFBoxX.Get_Font: IFontDisp;
begin
  GetOleFont(FDelphiControl.Font, Result);
end;

function TmicDTMFBoxX.Get_ImeMode: TxImeMode;
begin
  Result := Ord(FDelphiControl.ImeMode);
end;

function TmicDTMFBoxX.Get_ImeName: WideString;
begin
  Result := WideString(FDelphiControl.ImeName);
end;

function TmicDTMFBoxX.Get_ItemHeight: Integer;
begin
  Result := FDelphiControl.ItemHeight;
end;

function TmicDTMFBoxX.Get_ItemIndex: Integer;
begin
  Result := FDelphiControl.ItemIndex;
end;

function TmicDTMFBoxX.Get_Items: IStrings;
begin
  GetOleStrings(FDelphiControl.Items, Result);
end;

function TmicDTMFBoxX.Get_MaxLength: Integer;
begin
  Result := FDelphiControl.MaxLength;
end;

function TmicDTMFBoxX.Get_ParentColor: WordBool;
begin
  Result := FDelphiControl.ParentColor;
end;

function TmicDTMFBoxX.Get_ParentCtl3D: WordBool;
begin
  Result := FDelphiControl.ParentCtl3D;
end;

function TmicDTMFBoxX.Get_SelLength: Integer;
begin
  Result := FDelphiControl.SelLength;
end;

function TmicDTMFBoxX.Get_SelStart: Integer;
begin
  Result := FDelphiControl.SelStart;
end;

function TmicDTMFBoxX.Get_SelText: WideString;
begin
  Result := WideString(FDelphiControl.SelText);
end;

function TmicDTMFBoxX.Get_Sorted: WordBool;
begin
  Result := FDelphiControl.Sorted;
end;

function TmicDTMFBoxX.Get_Style: TxComboBoxStyle;
begin
  Result := Ord(FDelphiControl.Style);
end;

function TmicDTMFBoxX.Get_Text: WideString;
begin
  Result := WideString(FDelphiControl.Text);
end;

function TmicDTMFBoxX.Get_Visible: WordBool;
begin
  Result := FDelphiControl.Visible;
end;

function TmicDTMFBoxX.Get_VisibleDockClientCount: Integer;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -