将窗口内容打印到文件 [英] print window content to a file

查看:70
本文介绍了将窗口内容打印到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想运行一个程序来识别所有当前打开的窗口,然后将它们的内容打印成单独的png(每个窗口分成一个png)。


这有可能吗?


我真的可以使用一些帮助......我是新手。


提前致谢

解决方案


我不确定它是怎么回事在W10中完成,但在W7中,您需要显示要打印的窗口。即,仅当窗口在屏幕(例如LCD监视器)上完全可见时,窗口的内容才被激活。但是,您可以更改设备上下文并将
重定向到重新绘制窗口的内存设备上下文。


J。


示例


https://stackoverflow.com/questions/14386312/how-一个窗口可以-I-复制的可视化内容的-和 - 把-IT-上一个新窗口功能于WIN3


Hi,

I would like to run a program which identifies all currently opened windows and then prints their contents into seperate pngs (each window into one png).

Is this possible at all?

I could really use some help.. I'm a newbie to this.

Thanks in advance

解决方案

Hi,

I am not sure how it is done in W10, but in W7 you need to display a window you want to print. i.e. the content of the window is protted only if the window is fully visible on a screen (e.g. LCD monitor). However, you can change the device context and redirect the drawing to memory device context at the window is re-drawn.

J.

example

https://stackoverflow.com/questions/14386312/how-can-i-copy-the-visual-content-of-a-window-and-put-it-on-a-new-window-in-win3


这篇关于将窗口内容打印到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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