Sign in to follow this  

Pause full screen application

Recommended Posts

Hi all, If any fullScreen application is running i want to pause/minimize it and open my fullscreen application.After that i want to restore again the initial application. C++ code will be appreciable. Thanks, Gerald.

Share this post

Link to post
Share on other sites
Well in my custom C++ game API, all you gotz to do is this:

//Somewherez in code
Game.setMode ( Game::GOD_MODE )

and everything is *fabulous*.

Joking aside, you have to tell us what API or engine you are using or what platform you are making this on. We don't have mind powers.

Share this post

Link to post
Share on other sites
I think i should be more clear with my question

I have an Console application(Say A.exe) built in VC++,the job of this application is to find any game is currently running in my pc.
If game is running the A.exe will call another exe say (B.exe).

The problem is "B.exe" should open in full screen mode and the game that was running previously should be paused/minimized.

I tried the following code which is in "A.exe" calls the "B.exe"

DWORD spi_time;
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &spi_time, 0);

STARTUPINFO info={sizeof(info)};
info.wShowWindow = SW_SHOW;

if (CreateProcess(NULL, "B.exe", NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo))
HWND hWnd = FindWindowA(NULL, "Quiz Application" ); //Window name of "B.exe"

::WaitForSingleObject(processInfo.hProcess, INFINITE);

The above code opens the "B.exe" but not able to focus as the first visible application (ie) B.exe is not spawn over the game which is running.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this