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

Thread: Getting External Mouse Events

  1. #1
    Join Date
    May 2008
    Posts
    44

    Getting External Mouse Events

    I need help with detecting mouse coordinates and clicks beyond my application. Im using SetWindowsHookEx(WH_MOUSE... but it only detects mouse events in my program. As soon as the cursor leaves my application it stops getting mouse data.

    It would be great to have a sample of source

  2. #2
    Join Date
    Jan 2008
    Posts
    178

    Re: Getting External Mouse Events

    Read MSDN for SetWindowsHookEx(), LL or not
    Last edited by fred100; December 20th, 2008 at 07:22 AM.

  3. #3
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,917

    Re: Getting External Mouse Events

    Couple of words for clarification.
    You are not getting Getting External Mouse Events.
    Mouse movement and button clicks events are processed by a mouse driver. Windows generates messages that are sent to an application. What you are looking for is receiving mouse messages that are sent to windows other that your application window.

    Follow discussion in this, this or this thread.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  4. #4
    Join Date
    May 2008
    Posts
    44

    Re: Getting External Mouse Events

    Many thanks for the clarification JohnCz... is it possible to have a sample of source code? i´m a little bit n00b

  5. #5
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,917

    Re: Getting External Mouse Events

    You are welcome.
    Did you follow links I gave you? I think you did not, since you would find sample code already.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  6. #6
    Join Date
    May 2008
    Posts
    44

    Re: Getting External Mouse Events

    many thx .. i didn´t see it.

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)