Thread: mouse click chick if they happen

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    155

    mouse click chick if they happen

    Hi, I need help on getting what is click on my mouse. See I want to see "if(lbuttonclick)" or something like that. I know that doesnt work, I mean the lbuttondclick thing, but is there a way to do this?
    Also do I need to get a wait like cin>>getline; or something like that too?

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Interfacing with the mouse is non-standard and OS dependant. We do not know how to help you without these details.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    155
    Ok, sorry^.^; I thought it was non-standard. Will I am running on Windows XP and my compiler is Dev-C++.

  4. #4
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    I'm not going to give any specific examples, as it crashes the way I have it set up (strangely enough, a simple call to GetNumberOfConsoleInputEvents), but you'll probably want to look up these functions/structs:

    SetConsoleMode (paying special attention to ENABLE_MOUSE_INPUT)
    ReadConsoleInput
    INPUT_RECORD (paying special attention to Event.MouseEvent)
    MOUSE_EVENT_RECORD (paying special attention to dwMousePosition and dwButtonState)
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem in mouse position
    By Arangol in forum Game Programming
    Replies: 6
    Last Post: 08-08-2006, 07:07 AM
  2. Replies: 2
    Last Post: 03-23-2006, 07:08 AM
  3. Using mouse click
    By kakashi in forum C++ Programming
    Replies: 10
    Last Post: 01-31-2006, 01:38 AM
  4. Making a Mouse Click
    By r0ss in forum C Programming
    Replies: 1
    Last Post: 06-03-2004, 08:55 PM
  5. mouse click coords and moving a rect
    By techrolla in forum Windows Programming
    Replies: 1
    Last Post: 03-07-2004, 09:49 PM