olivier__ | Voila mon petit probleme, je veux afficher quelques pixels à l'écran...
Ca marche trés bien avec :
Code :
- void CAffPCXView::OnDraw(CDC* pDC)
- {
- CAffPCXDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- long int compteur1=0;
- while (compteur1<pDoc->ImageSize)
- {
- pDC->SetPixelV(compteur1%(pDoc->XSize),compteur1/(pDoc->XSize),(pDoc->imagexy2[compteur1++]));
- }
- }
|
Mais je fait ça :
Code :
- void CAffPCXView::OnDraw(CDC* pDC)
- {
- CAffPCXDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- CDC aDC;
- aDC.CreateCompatibleDC ( pDC );
- long int compteur1=0;
- while (compteur1<pDoc->ImageSize)
- {
- aDC.SetPixelV(compteur1%(pDoc->XSize),compteur1/(pDoc->XSize),(pDoc->imagexy2[compteur1++]));
- }
- pDC->BitBlt(0,0,pDoc->XSize,pDoc->YSize,&aDC,0,0,SRCCOPY);
- aDC.DeleteDC();
- }
|
Ca ne marche plus...
Pourquoi? |