View Full Version : Mouse action

08-03-2002, 11:10 PM
Hi! I'm trying to developed an optical simulation of lens in openGL. I used NeHe tutorial for direct input. There i got an event procedure WM_LBUTTONDOWN.
This procedure work only when mouse is clicked. But I want to make to do some event when i remain holding down the mouse button.
That is say, a variable increase when i click the left mouse button. but i want it to increase while i keep the mouse button holding. Please can any one help me to do this?

08-04-2002, 07:26 AM

if you get a WM_LBUTTONDOWN message, you set a bool flag, let's say lbdown. So you do

lbdown = true;
then M$ Windoughs provides a message called WM_LBUTTONUP on this message you do

lbdown = false;
That's basicly it! You should have a look at the WM_ Messages of Windoughs in the MSDN or the online version msdn.microsoft.com (http://msdn.microsoft.com) .



[This message has been edited by mphanke (edited 08-04-2002).]