Yes it is. All what you need is get handle to window which you want to capture and use WinAPI function PrintWindow for example:
// Get the window handle of calculator application.
HWND hWnd = ::FindWindow( 0, _T( "Calculator" ));
// Take screenshot.
PrintWindow( hWnd, getDC(hWnd), 0 );
Here you have PrintWindow documentation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…