如何捕获C ++ MFC UI屏幕图像并保存到jpg? [英] How to capture image of C++ MFC UI screens screen and save to jpg?

查看:81
本文介绍了如何捕获C ++ MFC UI屏幕图像并保存到jpg?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何捕获C ++ MFC UI屏幕图像并保存为jpg?


Printwindow和BitBlt API打印了屏幕的可见部分。如果有任何控制部件只有在我们向下滚动时才能看到这些部分无法打印为jpeg。怎么做?这个新线程是下面线程的延续。


http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fec1ef6d-fc1d-4a1d-b56d- 80d0550e5a95 /


谢谢


~Pervez

解决方案

1。为什么要创建第二个帖子?


2。如果您还想捕获控件的不可见部分,那么由于必须滚动才能看到所有数据而不可见的数据并非易事。


用于捕获屏幕的所有方法仅创建屏幕副本并将其打印/保存为图片...您必须创建所有屏幕截图您的窗口内容可以自己滚动。


以下是创建jpg屏幕截图的示例:


http://forums.codeguru.com/showpost.php?p=1841797&postcount=4


您必须在内存DC中绘制数据,而不是捕获屏幕。




How to capture image of C++ MFC UI screens screen and save to jpg?

Printwindow and BitBlt APIs has printed the visible portion of the screen. If there is any control part which is viewable only if we scroll down those portions are unable to print as jpeg. How to do that? This new thread is continuation of below thread.

http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fec1ef6d-fc1d-4a1d-b56d-80d0550e5a95/

Thanks

~ Pervez

解决方案

1. Why creating a 2nd thread?

2. If you also want to capture the not visible part of your control, data that are not visible because it must be scrolled to see all is not an easy job.

All Methods used to capture the screen are only creating a copy of the screen and print it / save it as pictures... You have to create your screen capture with all your content of your window that can be scrolled by your own.

Here is an example on creating a jpg screenshot:

http://forums.codeguru.com/showpost.php?p=1841797&postcount=4

Instead of capturing your screen you have to paint the data in your memory DC.


这篇关于如何捕获C ++ MFC UI屏幕图像并保存到jpg?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆