CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Disable Mouse

  1. #1
    Join Date
    Oct 2005
    Location
    Bangalore
    Posts
    167

    Disable Mouse

    Now i am developing a app using MFC, it is look like a simple game. In that i am using a Joystick. so i have not required mouse. so I want to block all the mouse operations. how can i do.

    Thanks in advance

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Disable Mouse

    Just unplug the mouse!
    Victor Nijegorodov

  3. #3
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Disable Mouse

    Change the mouse cursor to a empty cursor so it becomes invisible, and use SetCapture/ReleaseCapture to redirect all the clicks to your window and simply ignore the clicks.

  4. #4
    Join Date
    Feb 2009
    Location
    India
    Posts
    444

    Re: Disable Mouse

    You could also use ClipCursor to confine the cursor to a small or 0 sized rectangle.
    «_Superman
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

  5. #5
    Join Date
    Oct 2005
    Location
    Bangalore
    Posts
    167

    Re: Disable Mouse

    Thank you Mr Skizmo. But i am confusing, redirction is the correct way or any other way is there to completely stop the mouse event.

  6. #6
    Join Date
    Feb 2009
    Posts
    56

    Re: Disable Mouse

    Quote Originally Posted by bagavathikumar View Post
    Now i am developing a app using MFC, it is look like a simple game. In that i am using a Joystick. so i have not required mouse. so I want to block all the mouse operations. how can i do.

    Thanks in advance
    Where is your application running ?
    -----

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

Featured