Wed, 18 Jun 1902 08:00:00 GMT
Q: Responding to Double Click versus Single Click
Using TPW 1.5 I want my program to respond to the user's having clicked on a certain area of the screen. I want the program to repond differently if the user double clicks on the same area of the screen. What I have done is to override the wmLButtonDown and wmLButtonDblClk procedures. Unfortunately, I find that double clicking mouse send a wm_LButtonDown message first, and then sends the wm_LButtonDblClk. I want some way for the program to ignore the wm_LButtonDown message (or at least immediately exit from wmLButtonDown procedure) if there is a wm_LButtonDblClk message in the queue. I thought I might be able to use PeekMessage with a range of wm_LButtonDblClk to wm_LButtonDblClk, but this doesn't seem to work. I'm guessing that this is due to the wm_LButtonDown message having already been processed by the time the wm_LButtonDblClk message enters the queue. Am I missing something obvious? Am I approaching the problem the wrong way? (I can't subtitute left double click with right click since I am going to use right click and right double click for a different purpose.) Thanks in advance for any help. Please post response, rather than e-mailing. Malcolm J. Jones TELUS Corporation
|