BITMAPINFOHEADER biHeader; memset(&biHeader, 0, sizeof(BITMAPINFOHEADER)); biHeader.biBitCount=24; biHeader.biCompression=BI_RGB; biHeader.biHeight=480; biHeader.biPlanes=1; biHeader.biSize=sizeof(BITMAPINFOHEADER); biHeader.biWidth=640; HDRAWDIB hdd = DrawDibOpen(); // 显示真彩位图 DrawDibRealize(hdd, pDC->m_hDC, TRUE); // 按1:2显示, pImgData不含信息头,为纯数据 DrawDibDraw(hdd, pDC->m_hDC, rect.left+160, rect.top+120, rect.Width()/2,rect.Height()/2, &biHeader, (LPVOID)pImgData, 0, 0, 640, 480, DDF_BACKGROUNDPAL); DrawDibClose(hdd);