RobWestbrook
Subject: New with WMLiberty
Hi Brent,

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

Kcproductionz
Subject: Re: New with WMLiberty
For your scan question just change your waits to look something like this

Code:


[scanloop1]
 scan
 calldll #kernel32, "Sleep",10 as long,ret as void
goto [scanloop1]


Subject: Re: New with WMLiberty
See here



Last edited by Brent on Oct 17th, 2006, 9:06am; edited 1 time in total
RobWestbrook
Subject: ListView Double Click
Brent,

I know it's been months since you posted the solution. I just now found it! (my fault entirely). Thank you very much. Works like a charm.

Rob


Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Full Version
Powered by phpBB © phpBB Group
Design by phpBBXS.Com | Lo-Fi Mod.