| |||||
| Dernière réponse | |
|---|---|
| Sujet : [VC++] chargement d'une nouvelle bitmap | |
| Kouye | bon j suis arrivé ..
dites moi si il y a moyens de faire plus simple :) GetDlgItem(IDC_RECT2)->GetWindowRect(test_rect); ScreenToClient(test_rect); CClientDC dc(this); BITMAP bitmapbits; test_cdc.CreateCompatibleDC(&dc); test_bitmap.Attach(::LoadImage(::AfxGetInstanceHandle(),MAKEINTRESOUR CE(IDB_BITMAP1), IMAGE_BITMAP,0,0,LR_LOADMAP3DCOLORS)); test_bitmap.GetBitmap(&bitmapbits); int cy=bitmapbits.bmHeight; int cx=bitmapbits.bmWidth; GetDlgItem(IDC_RECT2)->SetWindowPos( NULL, 10,0, cx,cy,SWP_NOMOVE |SWP_NOOWNERZORDER ); test_cdc.SelectObject(&test_bitmap); dc.BitBlt(test_rect.left,test_rect.top,50,50,&tes t_cdc,0,0,SRCCOPY); |
| Vue Rapide de la discussion |
|---|