解决方案 »

  1.   

    要使用 GDI+ 或 CImage(开源)
      

  2.   

    GDI+    Graphics g(dc.GetSafeHdc()); 
    Image image(L"Image.jpg"); // .bmp   .png
    TextureBrush brush(&image); 
    brush.TranslateTransform(-100,-100); 
    g.FillRectangle(&brush, 0, 0, image.GetWidth(), image.GetHeight());  
      

  3.   

    pictrure control只能显示bmp格式,对PNG/JPG无效
      

  4.   

    CImage tmpImage;
    tmpImage.Load(L"test.jpg");
    CWnd* pWnd;
    pWnd=GetDlgItem(IDC_IMAGE);
    CDC* pDC=pWnd->GetDC();
    HDC hDC = pDC->m_hDC; CRect rect_frame;
    pWnd->GetClientRect(&rect_frame); ::SetStretchBltMode(hDC,HALFTONE);
    ::SetBrushOrgEx(hDC,0,0,NULL);
    tmpImage.Draw(hDC,rect_frame);