How to deactivate the full screen of another program?

Asked

Viewed 84 times

1

For example, a game that is in full screen (With full screen do not mean maximized, but "even fullscreen"). How do I stay in window mode with C++ ?

I’ve tried using "Sendmessage" :

#include <windows.h>
int main()
{
    while (true)
    {
        if (GetAsyncKeyState(88))
        {
            HWND hWnd = GetActiveWindow();
            SendMessageA(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
        }
    }
}

But it didn’t work.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.