1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Bitmap bitmap;
bitmap.CreateCompatibleBitmap (&dc , 640, 480);
CDC dcMem;
dcMem.CreateCompatibleDC (this->GetDC());
dcMem.SelectObject (&bitmap)
for (int y=0;y<16;y++)
{
for (int j=0;j<32;j++)
{
if(cases[j][y]==1) dcMem.SetPixel( j, y,ROUGE);
else dcMem.SetPixel( j, y,BLACK);
}
}
//dc.BitBlt(20,20,32,16,&dcMem,0,0,SRCCOPY);
//StretchBlt(dc, 50, 50,29,100,dc,20, 20, 32, 16,SRCCOPY);
dc.SetStretchBltMode(STRETCH_HALFTONE );
dc.StretchBlt( 50, 50,29,100, &dcMem,20, 20, 32, 16,SRCCOPY) ; |
Partager