加一个message handler for WM_ERASEBKGND
BOOL CMyFormView::OnEraseBkgnd(CDC* pDC) 
{
// TODO: Add your message handler code here and/or call default
CDC dcmem;
dcmem.CreateCompatibleDC(pDC);
CBitmap bmp ;
bmp.LoadBitmap(IDB_BITMAP1);
CBitmap* pold =(CBitmap*)dcmem.SelectObject(&bmp);
BITMAP bm;
bmp.GetBitmap(&bm);
int swidth =bm.bmWidth;
int sheight =bm.bmHeight;
RECT rc;
GetClientRect(&rc);
int width =rc.right-rc.left;
int height =rc.bottom-rc.top;
pDC->StretchBlt(0,0,width,height,&dcmem,0,0,swidth,sheight,SRCCOPY);
dcmem.SelectObject(pold);
bmp.DeleteObject();
return FALSE;
//return CFormView::OnEraseBkgnd(pDC);
}