I am trying to hide Factorio window after removing its border by setting its style to WS_POPUP
. When I call ShowWindow(factorio, SW_HIDE)
the window leaves behind a black box, that is transparent to clicks, can not be activated, does not appear in the taskbar, but keeps being rendered where the original window would be (including z-order).
Asked
Active
Viewed 79 times
1

Remy Lebeau
- 555,201
- 31
- 458
- 770

LOST
- 2,956
- 3
- 25
- 40
-
Maybe it uses a separate alphablended window to provide a frame? – Jonathan Potter Aug 19 '23 at 06:23
-
@JonathanPotter I don't think so. If I don't change the style it disappears normally. – LOST Aug 19 '23 at 23:57
-
`Factorio` is a top-level window?Parent window or child window? And you have to note `WS_POPUP` cannot be used with the `WS_CHILD` style. Try disabling `WS_BORDER` and `WS_THICKFRAME`(`WS_SIZEBOX`) if you are using these. By the way, you'd better provide a minimal reproducible sample. – Torrecto - MSFT Aug 21 '23 at 06:48
-
I'm certainly very curious to know the answer here, sounds like yet another window manager bug. But I have a hunch that people dismiss this question because it looks like you didn't put a lot of effort into it. I would assume that you wouldn't have gotten close-votes if you had provided code and screenshots, possibly for both scenarios (with and without changing the style). – dialer Aug 27 '23 at 11:29