PrintWindow
-
I want to capture client area of a window. I am using vc++ and vs2005.
-
I want to capture client area of a window. I am using vc++ and vs2005.
-
Be prepared for long stakeout. The client areas only come out at certain hours during the night and tend to be sensitive to noise and light. It takes a lot of skill to capture them.
Nice joke, I am able to capture a window and also able to solve this image into a file but the problem is i can't print only the client area. I have also use the flag PW_CLIENTAREA. Please help to solve this
-
I want to capture client area of a window. I am using vc++ and vs2005.
I assume you wanted to do this in MFC...
bool CaptureWindow(CWnd* pWnd, CBitmap* pBitmap)
{
CRect rc;
pWnd->GetClientRect( rc );
CClientDC dc(pWnd);
if ( pBitmap->CreateCompatibleBitmap(&dc, rc.Width(), rc.Height()))
{
CDC memdc;
memdc.CreateCompatibleDC( &dc );
CBitmap* pOldBitmap = (CBitmap*) memdc.SelectObject( pBitmap );
memdc.BitBlt(0, 0, rc.Width(), rc.Height(), &dc, 0, 0, SRCCOPY);
memdc.SelectObject( pOldBitmap );
memdc.DeleteDC();
return true;
}
return false;
}God bless, Ernest Laurentin
-
I assume you wanted to do this in MFC...
bool CaptureWindow(CWnd* pWnd, CBitmap* pBitmap)
{
CRect rc;
pWnd->GetClientRect( rc );
CClientDC dc(pWnd);
if ( pBitmap->CreateCompatibleBitmap(&dc, rc.Width(), rc.Height()))
{
CDC memdc;
memdc.CreateCompatibleDC( &dc );
CBitmap* pOldBitmap = (CBitmap*) memdc.SelectObject( pBitmap );
memdc.BitBlt(0, 0, rc.Width(), rc.Height(), &dc, 0, 0, SRCCOPY);
memdc.SelectObject( pOldBitmap );
memdc.DeleteDC();
return true;
}
return false;
}God bless, Ernest Laurentin
is it possible to do this using printwindow?
-
is it possible to do this using printwindow?
I want to capture client area of a transparent layered window
-
is it possible to do this using printwindow?
I've never used that API (PrintWindow) (or WM_PRINTCLIENT message) but I would believe that should do the trick. Not sure about the layered window though.
God bless, Ernest Laurentin