//在屏幕上显示JPG图像
void CollectionDlg::DrawImage(int x, int y, CDC *pDC)
{
if (pPicture != NULL)
{
long nWidth,nHeight;
pPicture->get_Width( &nWidth );
pPicture->get_Height( &nHeight );
//图片原大显示
CSize sz(nWidth, nHeight );
pDC->HIMETRICtoDP( &sz );
pPicture->Render(pDC->m_hDC,x,y,sz.cx,sz.cy,0,nHeight,nWidth,-nHeight,NULL);
//////按窗口尺寸显示
// CRect rect;
// GetClientRect(&rect);
// pPicture->Render(pDC->m_hDC,x,y,rect.Width(),rect.Height(),0,nHeight,nWidth,-nHeight,NULL);
}
}
http://www.cnblogs.com/lemon0823/archive/2013/03/08/2949386.html