有没有办法可以做到这点:后台抓图.

fiveandfive 2008-11-03 11:52:30
有没有办法可以做到这点.

对一个非active 的窗口(最小化或非最小化),对其进行抓图并保存成一个文件?

VC 可以做到这一点吗?
...全文
178 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
fiveandfive 2008-11-04
  • 打赏
  • 举报
回复
谢谢.
zzz822163 2008-11-03
  • 打赏
  • 举报
回复
http://it.icxo.com/htmlnews/2005/01/17/551463.htm
Kudeet 2008-11-03
  • 打赏
  • 举报
回复
Window Contents Capturing using WM_PRINT Message

http://www.fengyuan.com/article/wmprint.html
zzz822163 2008-11-03
  • 打赏
  • 举报
回复
用PrintWindow()这个API

这个API可以在不影响所有窗口的情况下对指定的窗口句柄截图等功能.包括被挡住的,和被最小化的.
「已注销」 2008-11-03
  • 打赏
  • 举报
回复
HOOK绘图消息,袁峰的WINDOWS图形编程这本书中有介绍,不过他的那个例子中的HOOK方法你得自己改改
路人乙2019 2008-11-03
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 VsirSoft 的回复:]
PrintWindow
The PrintWindow function copies a visual window into the specified device context (DC), typically a printer DC.


BOOL PrintWindow(
HWND hwnd, // Window to copy
HDC hdcBlt, // HDC to print into
UINT nFlags // Optional flags
);


Parameters
hwnd
Handle to the window that will be copied.
hdcBlt
Handle to the device c…
[/Quote]
牛人。
VsirSoft 2008-11-03
  • 打赏
  • 举报
回复
PrintWindow
The PrintWindow function copies a visual window into the specified device context (DC), typically a printer DC.


BOOL PrintWindow(
HWND hwnd, // Window to copy
HDC hdcBlt, // HDC to print into
UINT nFlags // Optional flags
);


Parameters
hwnd
Handle to the window that will be copied.
hdcBlt
Handle to the device context.
nFlags
Specifies the drawing options. It can be one of the following values. Value Meaning
PW_CLIENTONLY Only the client area of the window is copied to hdcBlt. By default, the entire window is copied.


Return Values
If the function succeeds, it returns a nonzero value.

If the function fails, it returns zero.

Remarks
This function is similar to WM_PRINT. Before calling PrintWindow, first select a bitmap into hdcBlt.

19,464

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧