Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview HitTest not firing when dragover target
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00351086
Message ID:
00351413
Views:
14
I had implemented the service as you proposed. Each TreeView (the source and target) has a HitTest method. The problem I am having is the Target TreeView HitTest does not respond while the Drag is in progress. The Source Treeview gets a left click to "begin" the drag. As the the "pointer" is moved over the target treeview, the DropHighLight=Hittest does not trigger until the left mouse is released. The Hit test reponds as advertised when "Drag" is not engaged. I'm gonna run it through an event tracker to see whats happening. The HitTest just don't hit with left mouse down during a Drag.

I might note that both TVs have a HitTest. This is nice feature of MS TV6.0. Maybe it wasn't intended to fire until a target drop occurred. Let me know if you have some other suggestions. I'll respond back with any info I get from event coverage.

>The HitTest method expects the co-ordinates to be in TWIPS. The following extract should give you the general idea:-
>
>
>*** ActiveX Control Event ***
>LPARAMETERS data, effect, button, shift, x, y, state
>
>LOCAL loDropNode
>
>loDropNode = This.HitTest(x * lnTwipsX, y * lnTwipsY)
>
>if vartype(loDropNode) $ "O"
> *!* loDropNode is a valid node object.
>else
> *!* loDropNoed is NOT a valid node object.
>endif
>
>
>
>The next example illustrates how to get the lnTwipsX and lnTwipsY values using the Windows API:-
>
>
>LOCAL lnHWND
>LOCAL lnHDC
>LOCAL lnPixelsPerInchX
>LOCAL lnPixelsPerInchY
>
>*!* Pinch some constants from WINGDI.H
>#define LOG_PIXELS_X 88
>#define LOG_PIXELS_Y 90
>#define TWIPS_PER_INCH 1440
>
>declare integer GetDeviceCaps in WIN32API INTEGER lnHDC, INTEGER lnIndex
>declare integer GetActiveWindow in WIN32API
>declare integer GetDC in WIN32API INTEGER lnHDC
>
>lnHWND = GetActiveWindow()
>lnHDC = GetDC(lnHWND)
>
>lnPixelsPerInchX = GetDeviceCaps(lnHDC, LOG_PIXELS_X)
>lnPixelsPerInchY = GetDeviceCaps(lnHDC, LOG_PIXELS_Y)
>
>lnTwipsX = TWIPS_PER_INCH / lnPixelsPerInchX
>lnTwipsY = TWIPS_PER_INCH / lnPixelsPerInchY
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform