Bonjour, je code une application w32 en C.
J'ai une fenetre de demarage, (avec le logo etc..) qui est en format bitmap, charge a partir des resources, et affichee avec la fonction suivante:
case WM_PAINT:
{
HBITMAP g_alarm_bitmap;
BITMAP bm;
PAINTSTRUCT ps;
g_alarm_bitmap=LoadBitmap(HInstance,MAKEINTRESOURCE(ID_ALARM_BITMAP));
HDC hdc=BeginPaint(hwnd,&ps);
HDC hdc_mem=CreateCompatibleDC(hdc);
HBITMAP hbm_old=SelectObject(hdc_mem,g_alarm_bitmap);
GetObject(g_alarm_bitmap,sizeof(bm),&bm);
BitBlt(hdc,0,0,bm.bmWidth,bm.bmHeight,hdc_mem,0,0,SRCCOPY);
SelectObject(hdc_mem,hbm_old);
DeleteDC(hdc_mem);
EndPaint(hwnd,&ps);
}
je voudrais savoir comment charge un .png a la place de charge un bitmap...question de gagner pas mal de ko.
l3KTr0 Was HeRe