|
-
May 13th, 2011, 04:50 PM
#1
Thread Starter
Fanatic Member
Adding a menu in another program
Hello everyone.
In a java game (Minecraft) I want to add a server menu containing chat admin server commands. I already worked out everything required to send the keys (sendmessage WM_KEYDOWN) and to simulate mouse clicks. The only problem I have is a nice gui.
I already tried a topmost transparant window, but it has one large problem: focus change causes the background game window to lose focus, and thus open the game menu. I somewhat fixed this by sending focus/activate messages to the game window, but this causes the game to go fullscreen on 64 bit machines. (for some reason)
Then I thought of painting my controls ontop of the window, but I would still have to handle mouse movement which is not (easily) possible at that point. Is there any way to add a control to another window (with the coding) or set up some sort of Window hook to handle the events?
The final goal is a simple overlay which is clickable as if it is part of the game.
I do not have to read any information from the parent window, only have to add a Windows Forms control to it. Since java is different from .NET I doubt adding the control is even possible...
I know window hooking is a sensitive subject at these forums, if what I want to do is not allowed using hooking then hooking is not an option, and all I would have to know then is how to add my own control as child to another (window) handle.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|