I'm just starting out with WMLiberty. I've got a list view control. I've set it up for double-clicking. I want to intercept the message sent when an item is double-clicked. The message sent is LVN_ITEMACTIVATE.
I have a branch in my program that looks like this:
Code: |
[SetUpCallBacks] Callback LVTwoClick, OnLVTwoClick( long, long, long, long ), long dummy=SetUpWMHandler(hWindow) |
My functions look like this:
Code: |
FUNCTION SetUpWMHandler(hWnd) CallDLL #WML, "SetWMHandler", _ hWnd As long, _ LVN_ITEMACTIVATE As long, _ LVTwoClick As long, _ 0 As long, _ lResult As long SetUpWMHandler=lResult END FUNCTION FUNCTION OnLVTwoClick(hWnd, uMsg, wParam, lParam) OnLVTwoClick=1 notice "You double-clicked an item"+chr$(13)+str$(hWnd)+chr$(13)+str$(uMsg)+chr$(13)+str$(wParam)+chr$(13)+str$(lParam) END FUNCTION |
Is this correct? Do I need to do anything else to implement WMLiberty and the callback?
OK, next question. My program uses the WAIT command. Is there a way to branch, using a timer, to check for the incoming message? I have a tab control that I check with a timer every 200 mS. Can I do something like that with this? I've not used the SCAN before and I've built this 2900 line program so far with WAIT. Would it be complicated to change to SCAN? I took the WAIT out to experiment and put a SCAN loop in its place. The program no longer functioned.
As you can see, I'm probably barking up several wrong trees! Any help you can give me will be appreciated.
Rob
EDIT: Corrected a typo in the subject --Brent