void CTestDlg::OnPaint()
{
CRect r;
GetClientRect(&r);
CPaintDC dc(this);
CRect rect=CRect(0,0,r.Width()*0.2,r.Height()*0.3);
//GetClientRect(&rect);//µÃµ½´°ÌåµÄ´óС
CDC dcMem;
dcMem.CreateCompatibleDC(&dc);
CBitmap bmpBackground;
bmpBackground.LoadBitmap(IDB_BITMAP2);//¼ÓÔر³¾°Í¼Æ¬
BITMAP bitMap;
bmpBackground.GetBitmap(&bitMap);
CBitmap *pbmpOld=dcMem.SelectObject(&bmpBackground);
dc.StretchBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,bitMap.bmWidth,bitMap.bmHeight,SRCCOPY);
}