Bay Six Software Forum Index Bay Six Software
Beyond the Basics
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New with WMLiberty

 
Post new topic   Reply to topic    Bay Six Software Forum Index -> WMLiberty DLL
View previous topic :: View next topic  
Author Message
RobWestbrook
Guest





PostPosted: Jul 14th, 2005, 4:46pm    Post subject: New with WMLiberty Reply with quote

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
Back to top
Kcproductionz
Guest





PostPosted: Jul 15th, 2005, 10:23pm    Post subject: Re: New with WMLiberty Reply with quote

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]

Back to top
Brent
Site Admin


Joined: 01 Jul 2005
Posts: 797

PostPosted: Jul 30th, 2005, 3:51am    Post subject: Re: New with WMLiberty Reply with quote

See here
_________________
Brent


Last edited by Brent on Oct 17th, 2006, 9:06am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
RobWestbrook
Guest





PostPosted: Oct 11th, 2005, 6:51pm    Post subject: ListView Double Click Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bay Six Software Forum Index -> WMLiberty DLL All times are GMT
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



Lo-Fi Version
Powered by phpBB © 2001, 2005 phpBB Group