Check whether click is part of double-click
-
Hello! Is there some smart way of checking whether a click with the left mouse button is part of a double-click? Or will I have to use a timer, that is, when the left mouse button is clicked, I use the timer to wait and see if I receive an WM_LBUTTONDBLCLK within some interval.
-
Hello! Is there some smart way of checking whether a click with the left mouse button is part of a double-click? Or will I have to use a timer, that is, when the left mouse button is clicked, I use the timer to wait and see if I receive an WM_LBUTTONDBLCLK within some interval.
-
you don't have to count time ! WM_LBUTTONDBLCLK tells you if you made a double click (that means your two click are into a time intervalle like specified in your windows settings.
TOXCCT >>> GEII power
I'm Sorry that I didn't describe the problem accurately enough.. When we look at the incomming messages, a double click looks like this: WM_LBUTTONDOWN <<<< WM_LBUTTONUP WM_LBUTTONDBLCLK WM_LBUTTONUP I want to check if the message marked with the <'s is part of a double click. I guess I could do this myself with a timer, i.e wait and see if a WM_LBUTTONDBLCLK shows up within a given interval, but I was wondering if there already existed a function to do this. Cheers.
-
I'm Sorry that I didn't describe the problem accurately enough.. When we look at the incomming messages, a double click looks like this: WM_LBUTTONDOWN <<<< WM_LBUTTONUP WM_LBUTTONDBLCLK WM_LBUTTONUP I want to check if the message marked with the <'s is part of a double click. I guess I could do this myself with a timer, i.e wait and see if a WM_LBUTTONDBLCLK shows up within a given interval, but I was wondering if there already existed a function to do this. Cheers.
no, timer is not a correct solution because if you change your mouse settings, this will not correspond to the new "reality". What i don't understand, is why you look at all the incomming messages ??? Windows send much and more messages, and if you start catching all of these, you'll die before. just associate a function to the WM_LBUTTONDBCLK and that'll work. To persuade yourself, do what you did to know which messages were sent, but with the mouse over menu items !!! Just catch the messages you need ! Moreover, if WM_LBUTTONDBCLK is sent, it's because you really made a double-click... And finally, to answer your last question, if wou wanted to know if WM_LBUTTONDOWN was part of a double-click, set a flag when this signal happens, but we get back to our first problem... you have to set your timer with the value windows asociate to a double-click... could you give me the reason why you need this ? thanks
TOXCCT >>> GEII power
-
no, timer is not a correct solution because if you change your mouse settings, this will not correspond to the new "reality". What i don't understand, is why you look at all the incomming messages ??? Windows send much and more messages, and if you start catching all of these, you'll die before. just associate a function to the WM_LBUTTONDBCLK and that'll work. To persuade yourself, do what you did to know which messages were sent, but with the mouse over menu items !!! Just catch the messages you need ! Moreover, if WM_LBUTTONDBCLK is sent, it's because you really made a double-click... And finally, to answer your last question, if wou wanted to know if WM_LBUTTONDOWN was part of a double-click, set a flag when this signal happens, but we get back to our first problem... you have to set your timer with the value windows asociate to a double-click... could you give me the reason why you need this ? thanks
TOXCCT >>> GEII power
What I need this for is a tray icon! Try clicking once on the windows messenger tray-icon: A menu pops up! Try double clicking: The application shows! Messenger obviously knows when I double click and when I single click, and it isn't just handling DBLCLK, because then the menu would popup the first time you clicked. When you right click the icon, the menu appears right away. When you left click, then menu doesn't appear until a second later. So I was guessing that they wait and see if a WM_LBUTTONDBLCLK is coming. :~
-
What I need this for is a tray icon! Try clicking once on the windows messenger tray-icon: A menu pops up! Try double clicking: The application shows! Messenger obviously knows when I double click and when I single click, and it isn't just handling DBLCLK, because then the menu would popup the first time you clicked. When you right click the icon, the menu appears right away. When you left click, then menu doesn't appear until a second later. So I was guessing that they wait and see if a WM_LBUTTONDBLCLK is coming. :~
-
Hello! Is there some smart way of checking whether a click with the left mouse button is part of a double-click? Or will I have to use a timer, that is, when the left mouse button is clicked, I use the timer to wait and see if I receive an WM_LBUTTONDBLCLK within some interval.
you are right, will have to use timer :(
greatest thing is to do wot others think you cant
suhredayan@omniquad.commessenger :suhredayan@hotmail.com