Skip to content

Instantly share code, notes, and snippets.

@march1993
Created February 26, 2018 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save march1993/09cf19b93a31614400afa23bf8657fc8 to your computer and use it in GitHub Desktop.
Save march1993/09cf19b93a31614400afa23bf8657fc8 to your computer and use it in GitHub Desktop.
Prevent Windows taskbar still being visible when applications are in fullscreen.
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main()
{
HWND hwnd = FindWindow("Shell_TrayWnd", NULL);
if (hwnd == NULL) {
fprintf(stderr, "Unable to find the taskbar.\n");
return EXIT_FAILURE;
}
SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment