make borderless popup windows style optional

This commit is contained in:
somewhatlurker
2019-09-14 15:07:58 +10:00
parent 450f20277b
commit 5fc97e12dd
4 changed files with 11 additions and 1 deletions
@@ -74,7 +74,12 @@ int hookedCreateWindow(const char* title, void(__cdecl* exit_function)(int))
HDC hDev = wglGetCurrentDC(); // get handle to current opengl device context
HWND hWnd = WindowFromDC(hDev); // convert it to a window handle
SetWindowLongPtr(hWnd, GWL_STYLE, WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); // set no border (visible to ensure something is shown immediately)
LONG_PTR wndStyle = WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; // set no border (visible to ensure something is shown immediately)
if (nPopupBorderless)
wndStyle |= WS_POPUP;
SetWindowLongPtr(hWnd, GWL_STYLE, wndStyle);
SetWindowPos(hWnd, HWND_TOP, wndX, wndY, nWidth, nHeight, SWP_FRAMECHANGED); // adjust position to apply new style
printf("[Render Manager] Borderless mode.\n");