Location:
Search - IXDictGrabSink
Search list
Description: 金山词霸屏幕取词组件的MFC例程
网上只有VB调用例子,而没有VC++的,所编写了这个源码-Kingsoft Capture Characters from Screen Component MFC routines called VB online only examples and not VC. prepared by the FOSS
Platform: |
Size: 30720 |
Author: 茜塔 |
Hits:
Description: Option Explicit
Implements IXDictGrabSink
Private gp As GrabProxy
Private Sub Form_Load()
Set gp = New GrabProxy
With gp
.GrabEnabled = True 是否有效
.GrabInterval = 30 指定抓取时间间隔
.GrabMode = XDictGrabMouse 模式(鼠标是否加按键)
.AdviseGrab Me 接口指向自身
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set gp = Nothing
End Sub
Private Function IXDictGrabSink_QueryWord(ByVal WordString As String, ByVal lCursorX As Long, ByVal lCursorY As Long, ByVal SentenceString As String, lLoc As Long, lStart As Long) As Long
Label1.Caption = "当前坐标:" & "(" & lCursorX & "," & lCursorY & ")"
Label2.Caption = "当前语句:" & SentenceString
Label3.Caption = "当前字符:" & Mid(SentenceString, lLoc + 1, 1000)
End Function-Option Explicit
Implements IXDictGrabSink
Private gp As GrabProxy
Private Sub Form_Load()
Set gp = New GrabProxy
With gp
.GrabEnabled = True 是否有效
.GrabInterval = 30 指定抓取时间间隔
.GrabMode = XDictGrabMouse 模式(鼠标是否加按键)
.AdviseGrab Me 接口指向自身
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set gp = Nothing
End Sub
Private Function IXDictGrabSink_QueryWord(ByVal WordString As String, ByVal lCursorX As Long, ByVal lCursorY As Long, ByVal SentenceString As String, lLoc As Long, lStart As Long) As Long
Label1.Caption = "当前坐标:" & "(" & lCursorX & "," & lCursorY & ")"
Label2.Caption = "当前语句:" & SentenceString
Label3.Caption = "当前字符:" & Mid(SentenceString, lLoc+ 1, 1000)
End Function
Platform: |
Size: 9216 |
Author: mange |
Hits:
Description: Option Explicit
Implements IXDictGrabSink
Private gp As GrabProxy
Private Sub Form_Load()
Set gp = New GrabProxy
With gp
.GrabEnabled = True 是否有效
.GrabInterval = 30 指定抓取时间间隔
.GrabMode = XDictGrabMouse 模式(鼠标是否加按键)
.AdviseGrab Me 接口指向自身
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set gp = Nothing
End Sub
Private Function IXDictGrabSink_QueryWord(ByVal WordString As String, ByVal lCursorX As Long, ByVal lCursorY As Long, ByVal SentenceString As String, lLoc As Long, lStart As Long) As Long
Label1.Caption = "当前坐标:" & "(" & lCursorX & "," & lCursorY & ")"
Label2.Caption = "当前语句:" & SentenceString
Label3.Caption = "当前字符:" & Mid(SentenceString, lLoc + 1, 1000)
End Function-Option Explicit
Implements IXDictGrabSink
Private gp As GrabProxy
Private Sub Form_Load()
Set gp = New GrabProxy
With gp
.GrabEnabled = True 是否有效
.GrabInterval = 30 指定抓取时间间隔
.GrabMode = XDictGrabMouse 模式(鼠标是否加按键)
.AdviseGrab Me 接口指向自身
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set gp = Nothing
End Sub
Private Function IXDictGrabSink_QueryWord(ByVal WordString As String, ByVal lCursorX As Long, ByVal lCursorY As Long, ByVal SentenceString As String, lLoc As Long, lStart As Long) As Long
Label1.Caption = "当前坐标:" & "(" & lCursorX & "," & lCursorY & ")"
Label2.Caption = "当前语句:" & SentenceString
Label3.Caption = "当前字符:" & Mid(SentenceString, lLoc+ 1, 1000)
End Function
Platform: |
Size: 9216 |
Author: mange |
Hits: