It is currently April 8th, 2020, 4:30 pm

IsFullScreen 3.0

Plugins and Addons popular with the Community
User avatar
Cariboudjan
Posts: 61
Joined: May 12th, 2019, 8:55 am

Re: IsFullScreen 3.0

Post by Cariboudjan »

Cherryleaf wrote:
February 27th, 2020, 5:54 am
This code would do it, but I'm not sure if I feel like implementing it.

Code: Select all

bool isFullscreen(HWND windowHandle)
{
    MONITORINFO monitorInfo = { 0 };
    monitorInfo.cbSize = sizeof(MONITORINFO);
    GetMonitorInfo(MonitorFromWindow(windowHandle, MONITOR_DEFAULTTOPRIMARY), &monitorInfo);

    RECT windowRect;
    GetWindowRect(windowHandle, &windowRect);

    return windowRect.left == monitorInfo.rcMonitor.left
        && windowRect.right == monitorInfo.rcMonitor.right
        && windowRect.top == monitorInfo.rcMonitor.top
        && windowRect.bottom == monitorInfo.rcMonitor.bottom;
}
:oops: Pleeeease?

Code: Select all

Chrome.exe
Maximized and has focus on Monitor 2

Explorer.EXE
Windowed and has focus on Monitor 1

mspaint.exe
Fullscreen has has focus on Monitor 0