Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview hittest - bad parameters?
Message
 
 
To
25/07/2007 20:14:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01243640
Message ID:
01243659
Views:
31
Hi Dragan,

I couldn't get HitTest to error out regardless what positive values I passed as parameters. Are you sure you don't have #DEFINE that overrides something in the code?

>After implementing what Sergey dug out for me today, I got it to work right away and, well, almost everywhere.
>
>Except there's a bit of a conundrum with the treeview.hittest(twipsX, twipsY), which seems to work perfectly in some forms, sometimes in some forms, and never in one particular form. I'm getting a "Function argument value, type, or count is invalid."
>
>I've compared the instances of the treeview class in the first and third case, and they are almost identical. I tried setting them to be identical (including the Treeview dialog checkboxes), but no dice. I'm still getting the same error in the same places.
>
>Interestingly, the error appears only for some values of twipsX and twipsY - sometimes it keeps erroring out (I'm trying to hittest going from left to right) until it gets into a certain range of values.
>
>So are there some valid and invalid values to the parameters passed to treeview.hittest()? Is just multiplying the x and y parameters received in .MouseDown() by the twips-per-inch factor enough, or is there some sort of offset (objtoclient() maybe?) that needs to be taken care of?
>
>If anyone knows this, let me know too before I spend too much time debugging.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform