Change window title

02/13/2017 21:29 asdfg177#1
Hey,

how can I change the window title, normally its KalOnline. I need this to seperate function to different kal windows. anyone can help?

Greetz
02/14/2017 09:36 Hate123#2
This function doesn't work for you?
[Only registered and activated users can see links. Click Here To Register...]

You should be able to use that, however you'll need to inject a dll. Doing it on another window is a different task, never tried that.

Another way to separate windows would be to "save" the PID of the different windows into a file, alternatively just type them out into whatever bot/program you're using. That way you can get the right window/hwnd you need to send whatever you're doing to.
02/14/2017 10:01 valzzz40#3
Not sure if this is what you need xD
[Only registered and activated users can see links. Click Here To Register...]
02/14/2017 12:08 katze123#4
Quote:
Originally Posted by Hate123 View Post
You should be able to use that, however you'll need to inject a dll. Doing it on another window is a different task, never tried that..
Why should one inject a dll to do so?
Simply do:
Code:
#include <windows.h>

int main()
{
	char wname[] = "KalOnline";
	HWND hWnd = FindWindowA(0, wname);
	if (hWnd)
		SetWindowTextA(hWnd, "Katze123 ftw XD");
	return 0;
}
02/14/2017 16:33 Hate123#5
Quote:
Originally Posted by katze123 View Post
Why should one inject a dll to do so?
Simply do:
Code:
#include <windows.h>

int main()
{
	char wname[] = "KalOnline";
	HWND hWnd = FindWindowA(0, wname);
	if (hWnd)
		SetWindowTextA(hWnd, "Katze123 ftw XD");
	return 0;
}
Very true, didn't actually look at it tbh xD. But yeah, that should work unless XTrap gets angry.
02/14/2017 16:36 katze123#6
Quote:
Originally Posted by Hate123 View Post
Very true, didn't actually look at it tbh xD. But yeah, that should work unless XTrap gets angry.
It doesn't.
02/14/2017 20:32 asdfg177#7
Hey thanks for answers. but i think this is not what im looking for. i wanna change the window title beforehand. So that when i run my application it can iterate over all window handle and can check which window title is set. changing it in my application would mean that i have to make an extra iteration to change the window title and feed this extra information manually.

Maybe i open the engine in some editor? Winhex, ida, ... Maybe there are ways to change the title?
02/14/2017 20:53 katze123#8
Quote:
Originally Posted by asdfg177 View Post
Hey thanks for answers. but i think this is not what im looking for. i wanna change the window title beforehand. So that when i run my application it can iterate over all window handle and can check which window title is set. changing it in my application would mean that i have to make an extra iteration to change the window title and feed this extra information manually.

Maybe i open the engine in some editor? Winhex, ida, ... Maybe there are ways to change the title?
Modifications directly within the resources are probably detected (i suppose, but i don't know).
02/14/2017 20:56 Therajoke#9
naja den Tex ordner kann man immernoch einfach umbenennen und man wird nich gekickt ^^
02/14/2017 21:36 katze123#10
Quote:
Originally Posted by Therajoke View Post
naja den Tex ordner kann man immernoch einfach umbenennen und man wird nich gekickt ^^
dieses game ist einfach nur n witz ey :D
02/14/2017 21:42 Hate123#11
I'd say modifying the engine to change the window name will not work (they probably check it). However you can try, maybe try using resource hacker?

[Only registered and activated users can see links. Click Here To Register...]
02/14/2017 22:17 asdfg177#12
ill check that out.
02/15/2017 14:14 katze123#13
Quote:
Originally Posted by Hate123 View Post
I'd say modifying the engine to change the window name will not work (they probably check it). However you can try, maybe try using resource hacker?

[Only registered and activated users can see links. Click Here To Register...]
Not quite sure if it was private server or not, but i think somewhere they have a current checksum of the engine. If not, you can simply use IDA, reverse the location where they create the window (i think they are doing that with WinMain?) and see where the string is loaded from.
02/15/2017 15:19 Hate123#14
Quote:
Originally Posted by katze123 View Post
Not quite sure if it was private server or not, but i think somewhere they have a current checksum of the engine. If not, you can simply use IDA, reverse the location where they create the window (i think they are doing that with WinMain?) and see where the string is loaded from.
Yeah but to do that you'd still need to modify engine or use something else to either change it at startup.

I think the best way to do this is a simple proxy dll, and when it starts just have it change the title. Easiest and most reliable way without having to mess around with the engine. Also you don't have the risk of having to re-do it if they update engine.exe in an update.