目前,我正在捕获特定显示器的整个桌面,但是我真正想要的是捕获特定窗口的内容(不管其位置).
// Get the window handle of calculator application. HWND hWnd = ::FindWindow( 0,_T( "Calculator" )); // Take screenshot. PrintWindow( hWnd,getDC(hWnd),0 );
Here你有PrintWindow文档.