IPicture、BITMAP、HBITMAP和CBitmap的关系(二)

2014-11-24 08:53:08 · 作者: · 浏览: 2

m_headInfo.biWidth = m_rtShow.Width();
m_headInfo.biHeight = m_rtShow.Height();
m_headInfo.biSizeImage = m_nLen;

}

void CChildView::OnPaint()
{
CPaintDC dc(this); // device context for painting

StretchDIBits(m_MemDC.GetSafeHdc(),0,0,m_rtShow.Width(),m_rtShow.Height(),
0,0,m_rtShow.Width(),m_rtShow.Height(),(void*)m_pCurrBuf,(BITMAPINFO*)&m_headInfo,NULL,SRCCOPY);

dc.BitBlt(m_rtShow.left,m_rtShow.top,m_rtShow.Width(),m_rtShow.Height(),
&m_MemDC,0,0,SRCCOPY);

}