BOOL CMyEdit::OnEraseBkgnd(CDC* pDC) 
{
	// TODO: Add your message handler code here and/or call default
//**************************************************************************************
    
	//取消文字复选
	this->SetSel(0,0);
	
	//设置位图背景
	CBitmap bitmap;
	bitmap.LoadBitmap(IDB_BITMAP1);

	BITMAP bmp;
	bitmap.GetBitmap(&bmp);

	CDC dcCompatible;
	dcCompatible.CreateCompatibleDC(pDC);

	dcCompatible.SelectObject(&bitmap);

	CRect rect;
	GetClientRect(&rect);
	pDC->BitBlt(0,0,rect.Width(),rect.Height(),&dcCompatible,0,0,SRCCOPY);
	return TRUE;
//*********************************************************************************
	//CEdit::OnEraseBkgnd(pDC);
}

相关文章:

  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-29
  • 2022-01-24
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2021-07-16
相关资源
相似解决方案