J
Jimmy Lu
I use CBitmap::CreateBitmap create a CBitmap object, and sets the bit datas
by CBitmap::SetBitmapBits, but I can not display it on the screen(ie. use
CDC::BitBlt). Thanks in advance.
My codes like:
CBitmap bmp;
bmp.CreateBitmap(50,50,1,24,NULL); //24 bit colors
bmp.SetBitmapBits(bufLen, pBuf); //pBuf points to valid data
CDC dcMem;
dcMem.CreateCompatibleDC(pDC);
dcMem.SelectObject(&bmp);
pDC->BitBlt(0,0,50,50,&dcMem,0,0,SRCCOPY); // fault! can not display the
map.
by CBitmap::SetBitmapBits, but I can not display it on the screen(ie. use
CDC::BitBlt). Thanks in advance.
My codes like:
CBitmap bmp;
bmp.CreateBitmap(50,50,1,24,NULL); //24 bit colors
bmp.SetBitmapBits(bufLen, pBuf); //pBuf points to valid data
CDC dcMem;
dcMem.CreateCompatibleDC(pDC);
dcMem.SelectObject(&bmp);
pDC->BitBlt(0,0,50,50,&dcMem,0,0,SRCCOPY); // fault! can not display the
map.