如何对被遮盖的窗口截图
正常情况下,GetWindowDC(hwnd);然后BitBlt可以截图。如果这个窗口被其它窗口遮盖,又该如何截图呢?
网上很多资料说使用PrintWindow这个未公开的函数。想找到有没有其它的办法解决这个问题。
[解决办法]
PrintWindow非未公开的函数,参见msdn http://msdn.microsoft.com/en-us/library/dd162869(VS.85).aspx
[解决办法]
学习
[解决办法]
PrintWindow是公开的函数,XP以上系统才有。以下摘自MSDN。
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.
[解决办法]
窗口句柄已获得,那么可以置顶后截屏,然后置后。
[解决办法]
http://www.fengyuan.com/article/wmprint.html
[解决办法]
上来学习。。
[解决办法]
窗口句柄已获得,那么可以置顶后截屏,然后置后。赞同.
[解决办法]
关注.
[解决办法]