Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
5402 connectés 

 


Dernière réponse
Sujet : affichier une bitmap en VC++???? HELP urgent
Raoul DrawState
(hdc,NULL,NULL,MAKELONG(hFond,0),NULLcoordonnéX,coordonnesY,Longueur,Hauteur,DST_BITMAP
| DSS_NORMAL);
 
sinon pour 98 et 2000:
hBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_LOGOBITMAP));
 
puis dans WndProc(..)
 
PAINTSTRUCT Paint;
HDC hDC;
HDC hDCmem;
 
case WM_PAINT:
BeginPaint(hWndOwner, &Paint);
 
hDC = GetDC(hWndOwner);
hDCmem = CreateCompatibleDC(hDC);
SelectObject(hDCmem, hBitmap);
BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hDCmem, 0,
0, SRCCOPY);
 
DeleteDC(hDCmem);
ReleaseDC(hWndOwner, hDC);
 
EndPaint(hWndOwner, &Paint);
 
break;

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
Raoul DrawState
(hdc,NULL,NULL,MAKELONG(hFond,0),NULLcoordonnéX,coordonnesY,Longueur,Hauteur,DST_BITMAP
| DSS_NORMAL);
 
sinon pour 98 et 2000:
hBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_LOGOBITMAP));
 
puis dans WndProc(..)
 
PAINTSTRUCT Paint;
HDC hDC;
HDC hDCmem;
 
case WM_PAINT:
BeginPaint(hWndOwner, &Paint);
 
hDC = GetDC(hWndOwner);
hDCmem = CreateCompatibleDC(hDC);
SelectObject(hDCmem, hBitmap);
BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hDCmem, 0,
0, SRCCOPY);
 
DeleteDC(hDCmem);
ReleaseDC(hWndOwner, hDC);
 
EndPaint(hWndOwner, &Paint);
 
break;
nibbles1 ben si moi je peux pas t'aider, toi tu peux
 
comment t'as fait pour afficher ton bmp sous 98 ?
Raoul up
Raoul salut,
j'ai des prob pour afficher une bitmap sous VC++ (en fait ca marche sous 98 mais pas sous 200) donc, si vs aviez un exemple de code pour que je vois comment vous faites. (moi elle est ds mon fichier de ressources, mais si vs avez une autre methode)
merci
a+

 

[edit]--Message édité par Raoul--[/edit]


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)