Author |
Topic: List view: detecting columnclick (Read 809 times) |
|
Hans
New Member
member is offline


Gender: 
Posts: 31
|
 |
Re: List view: detecting columnclick
« Reply #5 on: Jul 18th, 2016, 3:01pm » |
|
The original site of msghook does not exist anymore. But still it can be downloaded at: http://vb.mvps.org/tools/MsgHook/.
So far I don't have succes. I inserted the pieces of code you offered. The program never gets within de part of "case _WM_NOTIFY", which makes all the rest useless.
I added Code:calldll #MsgHook, "WatchMsg", hLV as ulong, _WM_NOTIFY as long, r as boolean in the part "prepare callbacks", that did not help either.
Hans
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: List view: detecting columnclick
« Reply #6 on: Jul 18th, 2016, 9:26pm » |
|
on Jul 18th, 2016, 3:01pm, Hans wrote:| So far I don't have success. |
|
I know it can be made to work because I've done it successfully in BBC BASIC. In that case I used the embedded assembler to write my own custom message filter, to avoid overloading BASIC with the high volume of WM_NOTIFY messages.
So, as a last resort, my code could be ported to LBB using the 'BBC BASIC escape' feature (starting a line with an exclamation mark). Obviously the end result would be completely incompatible with LB 4, but at least you would end up with a working solution. Whether you want to go down that route is another matter!
Richard.
|
|
Logged
|
|
|
|
Hans
New Member
member is offline


Gender: 
Posts: 31
|
 |
Re: List view: detecting columnclick
« Reply #7 on: Jul 19th, 2016, 09:27am » |
|
After repeated searching I found a piece of code on the LB forum that does the trick with WMLiberty. After my vacation I'll study it. Maybe I can find what I am doing wrong, maybe WMLiberty is just better for this.
Have a good summer Hans
|
|
Logged
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: List view: detecting columnclick
« Reply #8 on: Jul 19th, 2016, 11:57am » |
|
I will remain Waiting you Hans.
We got a red summer here. Sarmed
|
| « Last Edit: Jul 19th, 2016, 11:58am by SarmedNafi » |
Logged
|
|
|
|
Hans
New Member
member is offline


Gender: 
Posts: 31
|
 |
Re: List view: detecting columnclick
« Reply #9 on: Aug 30th, 2016, 1:20pm » |
|
Using WMLiberty has serious drawbacks. On punishment of crashes, you can not use Wait, Confirm, Notice, Prompt, PopupMenu, Input and Input$(1) in your code. And who knows what else. On a crash you don't get a clou what happend. My code is quit large, so I don't want to get lost. Maybe I'll try something with a translucent graphicbox placed over the header. Then I can track clicks on that graphicbox and translate that to which header is clicked.
Hans
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: List view: detecting columnclick
« Reply #10 on: Aug 30th, 2016, 3:00pm » |
|
on Aug 30th, 2016, 1:20pm, Hans wrote:| Using WMLiberty has serious drawbacks. On punishment of crashes, you can not use Wait, Confirm, Notice, Prompt, PopupMenu, Input and Input$(1) in your code. |
|
My understanding is that most, if not all, of these limitations are specific to LB 4 and don't apply to LBB. For example I'm certain that it's OK to use WAIT with WMLiberty in LBB, and my expectation would be that the rest are OK too.
Do you have evidence that any of those statements cause problems when using WMLiberty with LBB? If so I would be interested to see examples that demonstrate the problem.
The one thing I do know is bad, when using WMLiberty, is calling the Sleep API for a lengthy period (e.g. for more than a couple of milliseconds) because that will introduce an undesirable latency in handling the trapped message. This is particularly an issue if trying to intercept WM_NOTIFY messages.
Richard.
|
|
Logged
|
|
|
|
|