Results 1 to 2 of 2

Thread: Mouse action

  1. #1
    Member Newbie
    Join Date
    Feb 2004

    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
    Member Contributor
    Join Date
    Feb 2002
    Wiesbaden, Germany

    Re: Mouse action


    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 .



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

Similar Threads

  1. GLUT : alternative action when closing window
    By thibault in forum OpenGL: General
    Replies: 3
    Last Post: 04-21-2009, 05:56 PM
  2. Replies: 492
    Last Post: 03-30-2009, 10:29 PM
  3. Q: Best course of action? Rendering options
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 09-22-2003, 02:08 AM
  4. Action Quake2 and Windows 2000
    By in forum OpenGL: User Software
    Replies: 0
    Last Post: 07-05-2001, 10:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean