Image image(_T("d:\\1.jpg"));
CWnd* pwnd = GetDlgItem(IDC_PIC);
CDC* dc = pwnd->GetDC();
CRect rect;
pwnd->GetClientRect(&rect); //获取客户区域的信息
Graphics graph(dc->GetSafeHdc());
// graph.DrawImage(&image, 0, 0, rect.Width(), rect.Height()); //按控件的长宽显示
graph.DrawImage(&image, 0, 0, image.GetWidth(), image.GetHeight()); //按图像大小显示
ReleaseDC(dc);