How can I do that?

Here's the original thread by bazik : Changing Classname of a running application

But wading thru this VB/Powerbasic cr4p does not really give me a clue on how to do it.
I can get all the handles and ProcessID's by myself - I just need a push in the right direction concerning the 'where' and 'how' to change the classname :grin:

Later,
Jimmy
Posted on 2002-11-19 07:59:50 by JimmyClif
I know, I should add more comments (IMHO source code is much better to read than comments) :)

Well, its not possible (maybe with WriteProcessMemory) to change the classname. Thats why I save the Process Handles in an array and rename the added Windows Title to "X-Root".

Maybe if you tell us why you want to change the ClassName we could find a solution :)
Posted on 2002-11-19 08:10:38 by bazik
Well, I could say that I got a programm called X-Win32 ( www.starnet.com ) for visualization of Unix programms which is really good but unfortunately some programs interfere with each other because all created windows have the same Classname ("XWinClass").

:rolleyes:
Posted on 2002-11-19 08:14:50 by JimmyClif

Well, I could say that I got a programm called X-Win32 ( www.starnet.com ) for visualization of Unix programms which is really good but unfortunately some programs interfere with each other because all created windows have the same Classname ("XWinClass").

:rolleyes:


:grin:

Just do it as I did and change the Caption :)
Pseudo code:

Call EnumerateWindows and call the following short function by passing the hWnd if the classname of the enumerated Windows = "XWinClass"


if [ GetCaption(hWnd) -ne "Done" ] # -ne means "not equal"
hWndArray(x) = hWnd
SetWindowCaption hWndArray(x) = "Done"
x++;
fi

Posted on 2002-11-19 08:23:57 by bazik