I've been interested in working with mouse input in Visual Studio using C++. I'm curious what steps need to be taken to do this. I'm assuming some sort of Windows header file needs to be included, but I have never seen any code for such things. Basically I want to be able to simply cout some info whenever the user clicks somewhere. It would be really cool if it would work so that it happens whenever the user clicks ANYWHERE on the desktop, but I'm not sure how that would work....Any direction would be greatly appreciated! THANKS


8 Years
Discussion Span
Last Post by Prabakar

Ok, thanks for the link. How can I make my program run and operate so that it runs in the background and responds/'cout's something whenever mouse button is clicked while the user is trying to click on something on the desktop?? Any ideas with that?!? Thanks!


Ok, so the link about hiding the console window works perfectly for what i wanted. You're just full of different links aren't you?! Lol thanks. However, the other link was way to confusing for me. All I'm tryin to do there is make some code that pops up some stupid message whenever the user attempts to click an icon that's on the desktop. Is there any easier suggestions for me to do that?!? Thanks! :)


I had been searching with Google, but I did not find anything other than the hook up method that Williamhemsworth used(the link I gave). You need to have some patience. Perhaps someone else can help you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.