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

📄 form_dtp.frm

📁 三汇CTI示例程序源码
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form_DTP 
   Caption         =   "Recorder_DTP"
   ClientHeight    =   5505
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9360
   LinkTopic       =   "Form1"
   ScaleHeight     =   5505
   ScaleWidth      =   9360
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame2 
      Caption         =   "Record Mode Setting"
      Height          =   1575
      Left            =   3840
      TabIndex        =   4
      Top             =   3840
      Width           =   5175
      Begin VB.ComboBox Combo_Cic 
         Height          =   315
         Left            =   1200
         Style           =   2  'Dropdown List
         TabIndex        =   9
         Top             =   720
         Width           =   735
      End
      Begin VB.OptionButton Option_MixRec 
         Caption         =   "Mix the recording of incoming and outgoing channels"
         Height          =   615
         Left            =   2280
         TabIndex        =   7
         Top             =   840
         Width           =   2775
      End
      Begin VB.OptionButton Option_OutRec 
         Caption         =   "Record only outgoing channels"
         Height          =   315
         Left            =   2280
         TabIndex        =   6
         Top             =   600
         Width           =   2775
      End
      Begin VB.OptionButton Option_InRec 
         Caption         =   "Record only incoming channels"
         Height          =   375
         Left            =   2280
         TabIndex        =   5
         Top             =   240
         Width           =   2775
      End
      Begin VB.Label Label1 
         Caption         =   "CircuitNo"
         Height          =   255
         Left            =   360
         TabIndex        =   8
         Top             =   720
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Function For Recording Mode"
      Height          =   1575
      Left            =   240
      TabIndex        =   0
      Top             =   3840
      Width           =   3615
      Begin VB.OptionButton Option_Ch 
         Caption         =   "Call the function with channel number as its parameter"
         Height          =   615
         Left            =   480
         TabIndex        =   3
         Top             =   840
         Width           =   2895
      End
      Begin VB.OptionButton Option_Cic 
         Caption         =   "Call the function with circuit number as its parameter"
         Height          =   615
         Left            =   480
         TabIndex        =   2
         Top             =   240
         Width           =   2655
      End
   End
   Begin MSFlexGridLib.MSFlexGrid CicGrid 
      Height          =   3495
      Left            =   240
      TabIndex        =   1
      Top             =   240
      Width           =   8775
      _ExtentX        =   15478
      _ExtentY        =   6165
      _Version        =   393216
      Appearance      =   0
   End
End
Attribute VB_Name = "Form_DTP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const E_CHG_SpyState = &H31
Private Sub Combo_Cic_Click()
    Dim nSel%
    nSel = Val(Combo_Cic.Text)
    Select Case (CicState(nSel).wRecDirection)
        Case CALL_IN_RECORD
                Option_InRec.value = True
                Option_OutRec.value = False
                Option_MixRec.value = False
        Case CALL_OUT_RECORD
                Option_InRec.value = False
                Option_OutRec.value = True
                Option_MixRec.value = False
        Case MIX_RECORD
                Option_InRec.value = False
                Option_OutRec.value = False
                Option_MixRec.value = True
    End Select
End Sub

Private Sub Form_Load()
    Dim i%
    
    Option_Cic.value = True
    m_nCallFnMode = 0
    
    If InitCtiBoard Then
        Dim EventSet As EVENT_SET_INFO
        Dim pEventSet As Long

        EventSet.dwWorkMode = 3         'Event-mode
        EventSet.lpHandlerParam = Me.hwnd
         gHW = Me.hwnd
        
        pEventSet = VarPtr(EventSet)
        If (SsmSetEvent(-1, -1, True, pEventSet) = -1) Then     'Set event-driven mode
            MsgBox ("Fail to call SsmSetEvent")
        End If
        If (SsmSetEvent(E_CHG_SpyState, -1, True, pEventSet) = -1) Then    'Set event-driven mode
            MsgBox ("Fail to call SsmSetEvent when setting E_CHG_SpyState")
        End If
        
        
        For i = 0 To nMaxCic - 1
            Combo_Cic.AddItem Str(i)
        Next i
        
        Call InitCircuitListCtrl
        Call UpdateCircuitListCtrl
        Hook
    Else
    Unload Me
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    SsmCloseCti         'Close board driver
    UnHook
End Sub

Private Sub Option_Ch_Click()
    m_nCallFnMode = 1
End Sub

Private Sub Option_Cic_Click()
    m_nCallFnMode = 0
End Sub

Private Sub Option_InRec_Click()
    Dim nSel%
    nSel = Val(Combo_Cic.Text)
    CicState(nSel).wRecDirection = CALL_IN_RECORD
End Sub

Private Sub Option_MixRec_Click()
    Dim nSel%
    nSel = Val(Combo_Cic.Text)
    CicState(nSel).wRecDirection = MIX_RECORD
End Sub

Private Sub Option_OutRec_Click()
    Dim nSel%
    nSel = Val(Combo_Cic.Text)
    CicState(nSel).wRecDirection = CALL_OUT_RECORD
End Sub

⌨️ 快捷键说明

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