I'm working on a desktop app using a library called Raylib, for those of you who don't know what Raylib is, it's an open-source rendering API that is used to make games. By default, Raylib doesn't let you resize or maximize as a window. To get around this, I found this code:
void ToggleGlutNormalWindow(LPCTSTR szWindowTitle)
{
long dwStyle;
HWND hwndGlut;
hwndGlut = FindWindow(NULL, szWindowTitle);
dwStyle = GetWindowLong(hwndGlut, GWL_STYLE | WS_THICKFRAME | WS_SIZEBOX);
// Flips Between On and Off
dwStyle ^= WS_MAXIMIZEBOX | WS_THICKFRAME | WS_SIZEBOX;
SetWindowLong(hwndGlut, GWL_STYLE, dwStyle);
}
As you can probably tell by my title, when compiled and ran, for me this produces a Windows Defender warning telling me it has detected a Trojan known as Ludicrouz.j.
Does anyone know a better way of enabling the maximize button and resizing, or do you know why this is being detected as a virus?