Capture d'écran et envoi de mail

jbHTS Messages postés 2 Date d'inscription mercredi 18 juin 2003 Statut Membre Dernière intervention 18 août 2003 - 18 août 2003 à 12:06
cs_bilal Messages postés 87 Date d'inscription dimanche 2 février 2003 Statut Membre Dernière intervention 4 mars 2010 - 21 févr. 2004 à 13:39
Bonjour tout le monde,
je souhaiterai savoir si il existe une fonction permettant de faire une capture d'écran et si vous connaissez des cours en français!! sur MAPI (pour envoyer de email)

Merci!

6 réponses

vecchio56 Messages postés 6535 Date d'inscription lundi 16 décembre 2002 Statut Membre Dernière intervention 22 août 2010 14
18 août 2003 à 12:11
To store an image temporarily, your application must call CreateCompatibleDC to create a DC that is compatible with the current window DC. After you create a compatible DC, you create a bitmap with the appropriate dimensions by calling the CreateCompatibleBitmap function and then select it into this device context by calling the SelectObject function.

Voila, débrouille toi avec ca :)
0
vecchio56 Messages postés 6535 Date d'inscription lundi 16 décembre 2002 Statut Membre Dernière intervention 22 août 2010 14
18 août 2003 à 12:13
Y'avait meme un exemple

/*
* Create a normal DC and a memory DC for the entire screen. The
* normal DC provides a "snapshot" of the screen contents. The
* memory DC keeps a copy of this "snapshot" in the associated
* bitmap.
*/

hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL);
hdcCompatible = CreateCompatibleDC(hdcScreen);

/* Create a compatible bitmap for hdcScreen. */

hbmScreen = CreateCompatibleBitmap(hdcScreen,
GetDeviceCaps(hdcScreen, HORZRES),

GetDeviceCaps(hdcScreen, VERTRES));

if (hbmScreen == 0)
errhandler("hbmScreen", hwnd);

/* Select the bitmaps into the compatible DC. */

if (!SelectObject(hdcCompatible, hbmScreen))
errhandler("Compatible Bitmap Selection", hwnd);

/* Hide the application window. */

ShowWindow(hwnd, SW_HIDE);

/*
* Copy color data for the entire display into a
* bitmap that is selected into a compatible DC.

*/

if (!BitBlt(hdcCompatible,
0,0,
bmp.bmWidth, bmp.bmHeight,
hdcScreen,
0,0,
SRCCOPY))

errhandler("Screen to Compat Blt Failed", hwnd);

/* Redraw the application window. */

ShowWindow(hwnd, SW_SHOW);
0
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
18 août 2003 à 12:30
http://www.cppfrance.com/article.aspx?Val=2263
http://www.cppfrance.com/article.aspx?Val=2274
capture d'ecran complete avec enreg en bmp.
Faut fouiller un peu, svp.
BruNews, ciao...
0
vecchio56 Messages postés 6535 Date d'inscription lundi 16 décembre 2002 Statut Membre Dernière intervention 22 août 2010 14
18 août 2003 à 14:16
Ouais ouais, pas mal du tout tes 2 sources BruNews. J'ai juste une petite question a te poser: ca veut dire quoi __stdcall au début de la définition de la fontion HwndToBmpFile ?
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
18 août 2003 à 14:27
__stdcall est une "modele" de fonction ou l'appele remonte la stack (ESP) d'autant d'octets qu'il y en a eu de mis sur la pile par les parametres. Le modele habituel en C est __cdecl ou l'appelant remonte ESP au retour de la fonction. __stdcall est normalement meilleur car permet une meilleur optimisation au niveau du prog appelant. C'est la norme egalement pour toute API correcte.
BruNews, ciao...
0
cs_bilal Messages postés 87 Date d'inscription dimanche 2 février 2003 Statut Membre Dernière intervention 4 mars 2010
21 févr. 2004 à 13:39
VGTA

olalal c trop long ca comme code

regarde dans mes source
@+
0
Rejoignez-nous