11

void CJianpanView::OnPaint() { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here // CRect temprect; // this->GetClientRect(&temprect); this->GetClientRect(&rect); // bgbmp->m_hObject=(HBITMAP)::LoadImage(NULL,"bground.BMP",IMAGE_BITMAP,rect.Width(),rect.Height(),LR_LOADFROMFILE); // mdc1->SelectObject(bgbmp); // mdc->BitBlt(0,0,rect.Width(),rect.Height(),mdc1,0,0, SRCCOPY); dc.BitBlt(0,0,rect.Width(),rect.Height(),mdc,0,0,SRCCOPY); // dc.StretchBlt(0,0,temprect.Width(),temprect.Height(),mdc,0,0,rect.Width(),rect.Height(),SRCCOPY); // Do not call CView::OnPaint() for painting messages }

你可能感兴趣的:(11)