Reputation: 5434
I'm totally lost here. I want to grab the visual content of a window for further processing, inside my console application. I know how to find the HWND, but from that I don't know what to do to get the content. The application I want to grab is 3D, but I don't know if its Direct3D or OpenGL, but I need to process every frame (some frame skipping would be acceptable though)
Thanks!
Upvotes: 1
Views: 1776
Reputation: 45284
You'll need to look into the BitBlt()
function. If you're not familiar with the Win32 GDI, the way to proceed might seem unintuitive. Take a look at this BitBlt()
Copy and Paste tutorial. The article doesn't present the whole code, and it's VB.net, but the outline of the method is presented (Window Handles, Graphics Contexts, BitBlt()
and their relashionships).
If this question is still unanswered in a few hours I'll post a more precise, C++ oriented answer then (I don't have the code with me right now).
Upvotes: 1