Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Mouse action

  1. #1
    Intern Newbie
    Join Date
    May 2002
    Location
    Dhaka
    Posts
    39

    Mouse action

    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?

  2. #2
    Intern Contributor
    Join Date
    Feb 2002
    Location
    Wiesbaden, Germany
    Posts
    95

    Re: Mouse action

    Hi,

    if you get a WM_LBUTTONDOWN message, you set a bool flag, let's say lbdown. So you do
    Code :
    lbdown = true;
    then M$ Windoughs provides a message called WM_LBUTTONUP on this message you do
    Code :
    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 .

    Greets,

    Martin

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •