Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/06/2010, 06:49
Avatar de RIVERMILLOS
RIVERMILLOS
 
Fecha de Ingreso: marzo-2010
Mensajes: 1.336
Antigüedad: 14 años, 2 meses
Puntos: 15
Respuesta: Como puedo hacer pantallazo en c++.

En windows....

consegui este codigo

CDC *p_DC = CWnd::GetDesktopWindow()->GetWindowDC();

CDC *testDC = new CDC;
if (!testDC->CreateCompatibleDC(p_DC))
{
delete testDC;
return;
}

testDC->SetMapMode(p_DC->GetMapMode());

CBitmap bitmap;
bitmap.CreateCompatibleBitmap(p_DC, 1024, 768);

CBitmap * pOldBitmap = testDC->SelectObject(&bitmap);

// This copies screen into video memory, not system memory!
testDC->BitBlt(0,0,1024,768, p_DC, 0,0, SRCCOPY)

pero no me funciona..

saludos