n0p
n0p

Reputation: 743

Is it possible to create and capture totally invisible/hidden window using Windows Graphics Capture API?

Totally invisible means the window is not visible to the user, is not shown on the taskbar and is not present in Alt+Tab/Win+Tab views.

I want to create such window and be able to capture it with Windows Graphics Capture API. Here is what I already did:

  1. I create a hidden window and then create a child window. This removes the child window from the taskbar.
  2. Then I cloak the child window which makes it invisible on the screen.

What I can't do is removing it from the task switcher (Alt+Tab/Win+Tab). Adding WS_EX_NOACTIVATE or WS_EX_TOOLWINDOW or removing WS_VISIBLE styles does the job, but makes it non-capturable by the API.

I have already read this, but it doesn't help: https://devblogs.microsoft.com/oldnewthing/20071008-00/?p=24863

Is it possible to achieve what I want? If yes - how? Thanks!

Upvotes: 2

Views: 577

Answers (1)

n0p
n0p

Reputation: 743

Setting WS_EX_TOOLWINDOW style on the window after capture item creation doesn't stop capturing.

Upvotes: 1

Related Questions