Windows: how to access final framebuffer and write pixels to it without window? [closed]

4 weeks ago 14
ARTICLE AD BOX

It is true that there are ways to write pixels to the screen without creating a window, but these pixels don't belong to you and will be overwritten the next time the screen changes.

If you want to display some content, please create your own window.

You can use a window with the WS_EX_TOPMOST style and call SetWindowDisplayAffinity(yourHwnd, WDA_EXCLUDEFROMCAPTURE), then use GraphicsCapture API capture screen image and display on your window. (and pray that no other windows using the WS_EX_TOPMOST style exist.)

How do I create a topmost window that is never covered by other topmost windows?

It's important to note that capturing the screen is not a cheap operation.

許恩嘉's user avatar

Read Entire Article