make borderless popup windows style optional
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user