Set window to full screen but showing the task bar

VansFannel 0 Reputation points
2023-09-17T15:15:20.6633333+00:00

Hi!

I'm developing a Windows 10 and Windows 11 application with C++.

I want to run an application in full screen mode, but showing the task bar.

Is there a way to do it programmatically?

Thanks.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,195 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,099 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,988 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. S.Sengupta 17,311 Reputation points MVP
    2023-09-18T01:10:02.59+00:00

    You can create a full-screen window using the CreateWindowEx function with the WS_POPUP style, which removes the window frame, and WS_VISIBLE to make it visible. The window size is set to match the screen resolution using GetSystemMetrics.

    See:

    https://stackoverflow.com/questions/2382464/win32-full-screen-and-hiding-taskbar


  2. Castorix31 83,206 Reputation points
    2023-09-18T07:48:55.6733333+00:00

    [the forum for Win32 API is https://learn.microsoft.com/en-us/answers/tags/224/windows-api-win32]

    You can do for example :

    				RECT rect;
    				SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
    				SetWindowLong(hWnd, GWL_STYLE, WS_POPUP | WS_VISIBLE | WS_MINIMIZEBOX);
    				SetWindowPos(hWnd, NULL, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER);
    
    0 comments No comments