Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview hittest - bad parameters?
Message
From
27/07/2007 11:50:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/07/2007 09:55:19
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:
01244147
Views:
26
>>>>Hi Dragan,
>>>>
>>>>What if you loop from right to left?
>>>>I see this.HitTest(x,y) and this.object.HitTest(x,y,ppNode as iNode @"). Either accepts only 2 parameters w/o error.
>>>
>>>Happens even with the location where the click actually happened (the first hittest check before the loop).
>>>
>>>I wonder whether this has anything to do with the version of Treeview. Digging back through UT messages, I found my own message from late nineties where I have found some differences in behavior between MSComctlLib.TreeCtrl.2 and COMCTL.TreeCtrl.1 - and I have never had problems with the latter. It also calls .hittest() and, after checking it, yes it still works OK. And the problematic class uses the MSComctlLib.TreeCtrl.2, of course.
>>
>>Hi Dragan,
>>I checked mine and it's MSComCtlLib.TreeCtrl. Here is the test code I had:
>
>Thanks for the code - there's a couple of neat ideas in it that I can use.
>
>However, in my case the problem seems to be in some API calls that change the behavior of the treeview. The problem was that if you click outside of the text, it highlights the whole row, but doesn't change the selected node, so both the freshly clicked row and the row with the selected node appear selected, but no nodeclick() is fired.
>
>I tried with a clean treeview, no APIs, and it doesn't even register a mouseDown or MouseMove if it's over a blank space. The one with APIs does, but in it most of the .hitTest() calls end with an error - for some values it's OK, for some it says "invalid type or count". For a while I thought it's because these parameters are defined as Single (it's a VB6 control anyway), and some of the values for twips per pixel came out as currency(!). I tried to cast them as integer or n(8,0), but no dice.

"I tried with a clean treeview, no APIs, and it doesn't even register a mouseDown or MouseMove if it's over a blank space."
So does that mean the code I sent is broken there? (or you didn't run at all:)
"it highlights the whole row" - reminds FullRowSelect = .t.
Hard case:( -and not using mdot maybe the culprit, but it's you, no.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform