Engine as Parent window

Posted By: TSG_Torsten

Engine as Parent window - 05/02/10 17:03

Hi all,

I've developed a c++ Application which starts an engine-exe. But it would be better if the engine isn't visible as a seperat window on the taskbar. Is there any possible function I could use to set the parent window in order to group the engine window with my application?

Regards
TSGames
Posted By: Quad

Re: Engine as Parent window - 05/02/10 17:37

I believe there is such functions in winapi, you may try bing search on msdn.
Posted By: davinski

Re: Engine as Parent window - 05/02/10 17:43

nah use google!
Posted By: Quad

Re: Engine as Parent window - 05/02/10 17:48

alright, here is the c/lite-c/c++ code that will hide the window from taskbar(also from alt+tab)

Code:
#include <acknex.h>
#include <windows.h>

#define WS_EX_TOOLWINDOW 0x00000080L
void main(){
	wait(1);
	ShowWindow(hWnd, SW_HIDE) ;
	SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE)  | WS_EX_TOOLWINDOW);
	ShowWindow(hWnd, SW_SHOW) ;
}


obviously this lite-c but you can do this with same method from c++. hWnd is the handle of the Gamestudio window.
Posted By: TSG_Torsten

Re: Engine as Parent window - 05/02/10 18:11

First, thanks for this very great and working example, quadraxas.

But I actually won't hide the window, but group it to my application window on the taskbar. I've got no idea what I've to look for, does this has to do with parent windows or is there a different technology on how to group the taskbar items/windows?

Regards
TSGames
Posted By: Lukas

Re: Engine as Parent window - 05/03/10 13:03

I think grouping in the taskbar is automatically done for multiple instances of the same application. I think there is no way to group them manually, but I might be wrong.
Posted By: TSG_Torsten

Re: Engine as Parent window - 05/03/10 13:38

Well, actually I've seen demo-applications which spawn new windows of the same instance (the same process) but have different taskbar groups. But I want to do the inverse thing ^^ (well, this demo was for the ITaskBar3 object introduced in Windows 7, but I'm pretty sure this is already possible with the legacy taskbar).

Anyway, I've already tried SetParent. But this wasn't what I've looked for, if I use "SetParent(hWnd,My_Application_Window)" the Engine window is "inside" my application. So that won't work for me.

Any other ideas would be great laugh

Regards
TSGames
© 2024 lite-C Forums