microsoft / Windows.UI.Composition-Win32-Samples

Windows.UI.Composition Win32 Samples
MIT License
459 stars 186 forks source link

Could I user ScreenCaptureforHWND to capture the whole screen?When I change the hwnd to desktop,my program throws an exception in CreateCaptureItemForWindow. #68

Closed cqhblg closed 4 years ago

cqhblg commented 4 years ago

image image

robmikh commented 4 years ago

You can capture a given monitor using CreateForMonitor.

robmikh commented 4 years ago

Here's an expanded version of that header:

https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/util/capture.desktop.interop.h

cqhblg commented 4 years ago

Thank you!!!