From c0303c88d05925c9e36ab4b6b3f8d4db67d26d7d Mon Sep 17 00:00:00 2001 From: Marocco2 Date: Thu, 22 Dec 2022 18:26:01 +0100 Subject: [PATCH] add `WS_EX_TOOLWINDOW` in extended windows styles for GlosSI-Target https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles Goal is to remove GlosSI-Target window in Alt-Tab listing as it will induce issues with Steam Link and not particularly intuitive when switching from and to a game. Currently untested, PR needed only for building a PoC of it and checking for possible issues --- GlosSITarget/TargetWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GlosSITarget/TargetWindow.cpp b/GlosSITarget/TargetWindow.cpp index ee01712..a9a662e 100644 --- a/GlosSITarget/TargetWindow.cpp +++ b/GlosSITarget/TargetWindow.cpp @@ -335,6 +335,10 @@ void TargetWindow::createWindow() style &= ~WS_OVERLAPPED; style |= WS_POPUP; SetWindowLong(hwnd, GWL_STYLE, style); + + auto exStyle = GetWindowLong(hWnd, GWL_EXSTYLE); + exStyle |= WS_EX_TOOLWINDOW; + SetWindowLong(hWnd, GWL_EXSTYLE, exStyle); MARGINS margins; margins.cxLeftWidth = -1;