如提目:
给出代码或者思路或连接都好啊,先多谢了啊

解决方案 »

  1.   

    CRect rcPicture;
    GetClientRect(&rcPicture);
    BITMAP tbm;
    ::GetObject(hBitmap, sizeof(BITMAP), &tbm);
    CRect rcSrc(0, 0, tbm.bmWidth, tbm.bmHeight); CRect rcPicCell(rcPicture);
    rcPicCell.right = rcPicCell.left + tbm.bmWidth;
    rcPicCell.bottom = rcPicCell.top + tbm.bmHeight;
    // 从垂直方向进行平铺
    for ( ;rcPicCell.top < rcPicture.bottom; rcPicCell.OffsetRect(0, tbm.bmHeight) )
    {
    // 防止超出范围
    if ( rcPicCell.bottom > rcPicture.bottom )
    {
    rcPicCell.bottom = rcPicture.bottom;
    rcSrc.bottom = rcSrc.top + rcPicCell.Height();
    }
    // 对水平方向进行平铺
    for ( ;rcPicCell.right < rcPicture.right; rcPicCell.OffsetRect(tbm.bmWidth,0) )
    {
    // draw bmp
    }
    if ( rcPicCell.left < rcPicture.right )
    {
    // 该行还有一个
    rcPicCell.right = rcPicture.right;
    CRect rcCell(rcSrc);
    rcCell.right = rcCell.left + rcPicCell.Width();
    // draw bmp
    }
    }
      

  2.   

    BOOL CMyFormView::OnEraseBkgnd(CDC* pDC)
    {
       //用LoadImage导入位图后在dc中画出。。
    }
      

  3.   

    http://community.csdn.net/Expert/topic/4363/4363403.xml?temp=.3139917
      

  4.   

    http://www.codeguru.com/Cpp/controls/treeview/misc-advanced/article.php/c679