如题!!!!!!!!!!!!!!!!!1

解决方案 »

  1.   

    Graphics   graphics(GetDC()-> m_hDC); 
    Image   image(L"Your.png",   FALSE); 
    graphics.DrawImage(&image,   10,10, 100, 100);//大小位置
      

  2.   

    http://download.csdn.net/detail/haha_12345_haha/3275486
      

  3.   

    VC 贴png 图片的多种方http://download.csdn.net/detail/chudesong/3756838#comment
      

  4.   

    包含头文件:#include <atlimage.h>
    定义成员变量 CImage image;
    在OnInitDialog()或OnInitUpdate()函数里面:
            char path[256];
    GetCurrentDirectory(256,path);
    CString filepath = path;
    filepath += "\\res\\19.JPG";//加载图片的路径
    image.Load(filepath);在OnDraw()或OnPaint()函数里面:
    HBITMAP hBitmap=image.Detach();
    CBitmap bmp;
    bmp.Attach(hBitmap); CMainFrame* pframe = (CMainFrame*)AfxGetApp()->m_pMainWnd;
    CImgTestView* pview = (CImgTestView*)pframe->GetActiveView();
    CDC* pdc = pview->GetDC();
    CDC memdc;
    memdc.CreateCompatibleDC(pdc);
    memdc.SelectObject(&bmp);
    pdc->BitBlt(0,0,3000,3000,&memdc,0,0,SRCCOPY);
    memdc.DeleteDC();
    bmp.DeleteObject();
    齐活儿
      

  5.   

    VS2005以上的IDE,直接使用CImage是最简单的
      

  6.   

    是给对话框做背景还是按钮的背景?对话框背景GDI可以  如果是按钮的要重写…………