0

I've made some code that resizes the game window to fit the monitor upon running it, the only issue is that the taskbar is still visible. Most video games don't show that in full-screen.

I have tried using raylib's built-in ToggleFullscreen() method, but it cuts off the left and right sides of the screen with my monitor, which is not what I’m looking for.

Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415

2 Answers2

0

There is no function in Raylib to hide the taskbar. If you want to hide the taskbar, you’ll have to use platform-specific APIs.

Something like this:

#if _WIN32
#include <Windows.h>

void HideTaskbar(void) {
  HWND taskBar = FindWindowW(L"Shell_TrayWnd", NULL);
  ShowWindow(taskBar, SW_HIDE);
}

#else

/* Not implemented on other platforms */
void HideTaskbar(void) { }

#endif

(It will probably be better to solve the problems with ToggleFullscreen() instead.)

Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415
0

I found out that using SetWindowState(FLAG_FULLSCREEN_MODE); worked for my purposes. However, if anyone needs this in the future, please take note that it is not possible to Alt-Tab out of the window if you use this method.