I wasn't sure if this was better to post to the Windows Programming forum or here.
I've created a program that simulates clicking, but I can't figure out how to send it to a specific window without making the window active. I know there has to be a way (apparently autoit has some functions for it), but I can't find any way to do it in all my searching. I saw some sendInput function, but that doesn't seem to have any handling, and I've seen some postMessage function that has handling, but it doesn't (from what I've read) leave the window inactive. So far I haven't encountered anything that will keep the window inactive and send the mouse clicks/movement to it at the same time. Does anybody know any way to do it (or any workaround)?
Also, I sent my executable to a friend, and lo and behold, it didn't work at all. He was missing a .dll file. So I was wondering, how would one pack an executable so that it provides the files necessary if they aren't available, or do I need to figure out how to install those?
Project properties > Configuration properties > C/C++ > Code generation: set runtime libraries to mult-threaded (MT)for release and multi-threaded debug (MTd) for debug configuration.
If you use any external libraries you will need to rebuild them statically as well.