Click here to Skip to main content
15,798,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I have this problem: i would like to add in my application (MFC, VC++ 9.0) a thumbnail of the content of another application. The thumbnail is not a static one, but changes in real time. In other words, my application should display the content (in real time, but smaller than the original) of the client area of another application, in which the content is in an openGL image that rapidly change.

I have in mind the thumbnail preview of the Windows 7/Vista taskbar, that changes in real time the content of the client area of any application. Ok, I would like to put that little window in my app! :-)

I believed that there were some APIs to do that (or some controls), but I haven't found anything...

Is there a way to display a real time stretched image showing the content of another window?

1 solution

Here an example of how to capture screen or a window:[^]

You would need to search for some code to resize the image to the preferred size but that shouldn't be to hard.

Good luck!
Share this answer
Sandeep Mewara 23-Oct-10 4:56am    
Comment from OP:
Thanks for your reply,
but I've already tried that solution. First of all, I have to grab an openGL window (the bitmap I get with that method is always a blank one ), and I don't need a (static) screenshot of that window, but something like a video stream (like the Windows 7 taskbar thumbnail preview, which is in real time and changes its content as the original window does). For example, if my source application is a video (playing in VLC), I want to see in my app the same video in a small area...
E.F. Nijboer 24-Oct-10 13:54pm    
I know what you mean. If you take a screenshot of a video playing and paste this in paint for example while the video is still playing, you can watch the video in paint as well. The reason for that is that the graphics card receives instructions through the driver from that application in OpenGL or DirectX format. This means that an image of a 3d projection in OpenGL is created by the graphics card and not in main memory. Also, the video data is sent to the card where it added to the screen image as overlay. In some older systems/cards you can really see this by moving around the video screen and see that the actual video playing is lagging to keep up with the window.
What this all comes down to, is that capturing such windows is not that easy because you can capture the window itself but the content of it is created somewhere else and a complete image is composed there. There are some examples of how, but it seems without guarantee.
E.F. Nijboer 24-Oct-10 14:21pm    
Info on capturing openGL:
Capture minimized windows:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900