Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted
There are better ways of doing this, that don't involve waiting. For example, if you use CreateProcess() to launch a program then WaitForInputIdle(), you can then EnumWindows() to match a window handle to the process ID. Once you have the handle you can force it to the foreground and top of z order, thus forcing any other screen into the background. I also have code which can achieve the same result from launching shortcuts (*.lnk). Normally getting a window handle of a program launched by a shortcut is difficult.

I think your misunderstanding a little. Im not waiting for the launched process, and I'm not changing the zorder any more, i Was sending HIDEOS to the back but that was unreliable as sending it to the back gave it the focus. Its also a little risky having gameex take for granted it has the right window handle. Some apps spawn more windows and processes such as visual pinball. I believe I am doing this now the most compatible and reliable way for all apps, emulators and systems.

The wait is before GameEx closes HideOS, which will make the launched app visible. The apps process/es has already been launched. This only affects apps that need the showdesktop setting anyway.

Guest
This topic is now closed to further replies.
×
×
  • Create New...