|
@@ -106,15 +106,17 @@ namespace ImgAssist
|
|
|
RECT rc,rcc;
|
|
|
::GetWindowRect(hWnd, &rc);
|
|
|
::GetClientRect(hWnd, &rcc);
|
|
|
- int width = rc.right - rc.left;
|
|
|
- int height = rc.bottom - rc.top;
|
|
|
+ int width = rcc.right - rcc.left;
|
|
|
+ int height = rcc.bottom - rcc.top;
|
|
|
+ int dx = rc.right - rc.left - width;
|
|
|
+ int dy = rc.bottom - rc.top - height;
|
|
|
// 创建兼容位图;
|
|
|
hbmpWindow = ::CreateCompatibleBitmap(hdcWindow, width, height);
|
|
|
// 将位图选入兼容DC;
|
|
|
SelectObject(hdcMemDC, hbmpWindow);
|
|
|
#if 1
|
|
|
// 将窗口复制到兼容DC中(当窗口被遮挡时,这个函数效果好)
|
|
|
- if(!::PrintWindow(hWnd, hdcMemDC, 0))
|
|
|
+ if(!::PrintWindow(hWnd, hdcMemDC, PW_CLIENTONLY))
|
|
|
{
|
|
|
goto done;
|
|
|
}
|