CImage 显示JPG

bool CMainDlg::Show_JPG(CString strFileName, int Control_id)
{
CImage m_Image;
m_Image.Load(strFileName);
CRect rect;
CWnd *pWnd = GetDlgItem(Control_id);
pWnd->GetClientRect(&rect);
CDC *pDC = pWnd->GetDC();
if (!m_Image.IsNull()) 
m_Image.Draw(pDC->m_hDC, rect);
else return false;
ReleaseDC(pDC);
return true;
}

你可能感兴趣的:(CImage 显示JPG)