Enregistrer une impression d'écran dans un fichier gif
cs_elodie92
Messages postés1Date d'inscriptionlundi 21 octobre 2002StatutMembreDernière intervention21 octobre 2002
-
21 oct. 2002 à 20:26
cs_totodude
Messages postés24Date d'inscriptionvendredi 19 mars 2004StatutMembreDernière intervention 6 avril 2004
-
6 avril 2004 à 14:35
Bonjour a tous,
Je dois enregistrer l'écran dans un fichier bmp puis le convertir en un fichier gif.
J'ai réussi a enregistrer l'encran en VB:
--------------------------------------------------------
Call keybd_event(vbKeySnapshot, 1, 0, 0)
SavePicture Clipboard.GetData(vbCFBitmap), "c:\screen.bmp"
DoEvents
--------------------------------------------------------
Mais je n'arrive pas a le traduir en C++ :-(
Et comment convertir ce fichier en gif apres ?
Merci d'avance pour vos réponses :-)
A voir également:
Enregistrer une impression d'écran dans un fichier gif
stephbb75
Messages postés726Date d'inscriptionmercredi 22 avril 2009StatutMembreDernière intervention 3 mars 2020 22 oct. 2002 à 09:09
Tu peut tester cela pour la capture :
#include "stdafx.h"
#include "toclip.h"
/****************************************************************
* toClipboard
* Inputs:
* CWnd * wnd: Window whose contents are to be sent
* to the clipboard
* BOOL FullWnd: TRUE for entire window,
* FALSE for client area
* Result: void
*
* Effect:
* Copies the contents of the client area or the window
* to the clipboard in CF_BITMAP format.
*****************************************************************/
void toClipboard(CWnd * wnd, BOOL FullWnd)
{
CDC dc;
if(FullWnd)
{ /* full window */
HDC hdc = ::GetWindowDC(wnd->m_hWnd);
dc.Attach(hdc);
} /* full window */
else
{ /* client area only */
HDC hdc = ::GetDC(wnd->m_hWnd);
dc.Attach(hdc);
} /* client area only */