|
-
Jun 9th, 2015, 10:15 PM
#11
New Member
Re: CommonControls (Replacement of the MS common controls)
 Originally Posted by vb6rocks
I've not been able to reproduce the issue in the Demo project. However, as you can see, the implementations are different in both cases. It's not clear what is causing the issue.
I was able to reproduce the run-time error on the latest version of VBCCR11.OCX (Revision 32).
Additionally, I was able to identify that the following line (in red) in VBCCR11 is what is causing the run-time error (Overflow):
Private Sub UserControl_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
If ListViewDragIndex > 0 Then
If ListViewHandle <> 0 Then
Dim P(0 To 1) As POINTAPI, RC As RECT
GetCursorPos P(0)
ScreenToClient ListViewHandle, P(0)
SendMessage ListViewHandle, LVM_GETITEMPOSITION, ListViewDragIndex - 1, ByVal VarPtr(P(1))
SendMessage ListViewHandle, LVM_GETVIEWRECT, 0, ByVal VarPtr(RC)
ListViewDragOffsetY = (P(1).Y - P(0).Y) + RC.Top
ListViewDragOffsetX = (P(1).X - P(0).X) + RC.Left
End If
If PropOLEDragMode = vbOLEDragAutomatic Then
Dim Text As String
Text = Me.FListItemText(ListViewDragIndex, 0)
Data.SetData StrToVar(Text & vbNullChar), CF_UNICODETEXT
Data.SetData StrToVar(Text), vbCFText
AllowedEffects = vbDropEffectMove Or vbDropEffectCopy
End If
End If
RaiseEvent OLEStartDrag(Data, AllowedEffects)
If AllowedEffects = vbDropEffectNone Then ListViewDragIndex = 0
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|