Results 1 to 4 of 4

Thread: Mouse handling in C

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    The Netherlands
    Posts
    386

    Resolved Mouse handling in C

    In my strategy game, I want to have some mouse control. I would use the Mouse move event or Mouse click event in the Message handling function, but I think that my mainloop will never get a chance to run because of the mouse moving constantly and thus diverting all attention to the message handling function...

    Is there some kind of API that will help me with handling the mouse?

    This is roughly what my loop and message loop looks like:

    Code:
    While (bRunning)
    {
    	if (PeekMessage(....))
    	{
    		//Handle message
    	}
    	else
    	{
    		//Mainloop functions
    	}
    }
    Last edited by Venom555; May 10th, 2005 at 07:52 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width