Duplicar posible:
how to make screen screenshot with win32 in c++?Cómo capturar parte de la pantalla y guardarla en un BMP?
Actualmente estoy tratando de crear una aplicación que guarda una parte de la pantalla a un bmp. He encontrado BitBlt pero realmente no sé qué hacer con él. Intenté buscar algunas respuestas, pero todavía no encontré una aclaración usando C++.
Así que, básicamente, quiero esta función:
bool capturePartScreen(int x, int y, int w int, h, string dest){
//Capture part of screen according to coordinates, width and height.
//Save that captured image as a bmp to dest.
//Return true if success, false if failure
}
BitBlt:
BOOL BitBlt(
__in HDC hdcDest,
__in int nXDest,
__in int nYDest,
//The three above are the ones I don't understand!
__in int nWidth,
__in int nHeight,
__in HDC hdcSrc,
__in int nXSrc,
__in int nYSrc,
__in DWORD dwRop
);
Lo que debería ser HDC y cómo puedo obtener el BMP?
Mira esta [pregunta SO] (http://stackoverflow.com/questions/3291167/how-to-make-screen-screenshot -with-win32-in-c). –
Mira esta [pregunta] (http://stackoverflow.com/questions/5292700/efficiently-acquiring-a-screenshot-of-the-windows-desktop), debe indicarte la dirección correcta –
@Jesse: Gracias , esa publicación me ayudó bastante :) – Anton