Overview:
I am going to create a touch application that interfaces with games and other apps. This concept is similar to the app found on touch-buddy.com but I will be using C# and WPF instead of how the application is written in Perl.
I have a few challenges I would like to evaluate. The touch-buddy app uses two approaches while interacting with games;
- Client mode (Same machine runs both game and touch-buddy).
- Server / Client mode where a separate box sends commands to the game machine.
The reason I believe for this method was to circumvent the issue with games minimizing.
In Client only mode I am faced with the issue where I touch a screen OTHER than the main screen where the game is viewed and then the game minimizes. Not all games have this behavior but I would like to conquer the games that do minimize and prevent it.
Is it possible to keep a game front and center Focused and prevent minimizing utilizing C# WndProc(ref Message m)?
I ha开发者_JAVA技巧ve been experimenting with WndProc(ref Message m) where I created a win form and when I press minimize on my own Win form and it will close an instance of notepad. This proves to me that I can capture a message, prevent that message from bubbling up and then send a message to another application. I then tried to click on notepad with my touch screen and keep my win form application in focus and not minimize. At this point I am unsuccessful. I need more time understanding message codes.
Is this the right approach? Can it be done? Should I look at other libraries such as Windows Automation?
Key input is my other concern. What is the best way to send key strokes to other apps/games. Should I tap into DirectX, use some kind of send key, Automation Framework? Can any of these handle the multiple key strokes that some simulation games require?
I appreciate any links and or insight you may have. If you have gone down this path for any reason I would love to hear your comments.
Stan
Here is a complete list of all the windows user32.dll API calls, and their declaration:
http://www.webtropy.com/articles/art9-2.asp?lib=user32.dll
perhaps you should take a look at that, and maybe play with some windows hooks
精彩评论