OnPaint里面贴图

//欢迎界面背景
  CRect ctrlRect;
  GetClientRect(&ctrlRect);
  //this->GetWindowRect(ctrlRect);
  CRect rec(0, 93,ctrlRect.right,ctrlRect.bottom-25);
  CDC *pdc = GetDC();
  CPoint OldPoint; 
  OldPoint=pdc->GetBrushOrg();
  CBrush myBrush;
  CBitmap bmpbk;
  bmpbk.LoadBitmap(IDB_BK_WELCOME);
  pdc->SetBrushOrg(CPoint(0,0));
  myBrush.CreatePatternBrush( &bmpbk);
  pdc->FillRect(&rec, &myBrush);
  bmpbk.DeleteObject();

你可能感兴趣的:(OnPaint里面贴图)