As I said in my previous post I am a complete and utter noob when it comes to c++ but im learning as much as I can from articles and youtube and reading here/just playing around. I have a project that I am working on for myself and im just taking the first steps but need a bit of help.
I have a gui with one button on it , the buttons job is to identify a program , in this case the program is "Pokerstars" select a "Lobby" and then open that lobby. This is what the software looks like:
I have placed two red arrows to demonstrate the "lobbies" when you select one of them you either double click or hit return when one is highlighted to present you with the lobby window which looks like this:
So my first question is , how do I "hook" to just the pokerstars window in the first screen shot so that when I hit "return" or send a double click command to open the lobby it only sends that command inside of pokerstars window and not to potentially something else that could be open?
Second question would be do I just use the keyboard return as a kind of "sendkeys" to do this or a similar mouse click or is there an easier way?
Hey thanks for the reply I will keep it in the Windows section,
Sorry I wasnt very specific. I am using c++ (visual studio 2010), by grabbing focus if i used mouseclicks and keystrokes does that mean they will only be used within the focus regardless of my actual mouse position if its elsewhere in the OS , e.g. if i was browsing or scrolling a webpage if I sent my program to mouseclick it would not affect my "real" mouse ?
mouse click will work as usual because you cannot control the mouse movements. But what can be done is, by controlling focus the keystrokes can go to specific window. If some other window is gaining focus, lets say by mouse click, that windows should give focus to the window you want as default.
There may be other ways to do it which I am not aware of.