Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to Use Win32 API to Hook to Windows and Detect Mouse Clicks?

Can you please give me sample code of a Win32 console application that will hook to Windows through the API and listen for mouse clicks (all mouse clicks in the OS; not just the clicks on the app's window)?

I looked high and low for this, but couldn't find it or learn how to do it.

I'd take your code, compile it in Visual C++ Express, and learn a lot from it. I hope that it'll be my door to finally wrapping my head around Win32 API because I'll have started with a little proggy that I'm really interested in, for a change.
Sign In or Register to comment.