int Width = GetSystemMetrics(SM_CXSMICON);
int Height = GetSystemMetrics(SM_CYSMICON);
HWND hWndSrc = hWndOfMircPicWin;
HWND hWnd = hWndSrc;
//get first parent of picwin
//HWND hWnd = FindWindowEx(hWndSrc, NULL, NULL, NULL);
HDC hDCMem = CreateCompatibleDC(NULL);
HDC hDC = GetWindowDC(hWnd);
HBITMAP hBmp = CreateCompatibleBitmap(hDC, Width, Height);
ReleaseDC(hWnd, hDC);
HGDIOBJ hOld = SelectObject(hDCMem, hBmp);
PrintWindow(hWnd, hDCMem, PW_CLIENTONLY);
//SendMessage(hWnd, WM_PRINT, (WPARAM) hDCMem, PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED);
//BitBlt(hDCMem, 0, 0, Width, Height, hDC, windowBorderLeft, windowBorderTop, SRCCOPY);
SelectObject(hDCMem, hOld);
DeleteObject(hDCMem);