[求助]Debug Assertion Failed!
自定义控件编程中在OnDrow函数中输入了一下代码,为了实现图像控件的生成:
void CPumpCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
// TODO: Replace the following code with your own drawing code.
BITMAP bm;
pump.LoadBitmap(IDB_BITMAP_PUMP); //其中pump是全局CBitmap变量
CDC dcCompatible;
dcCompatible.CreateCompatibleDC(pdc);
dcCompatible.SelectObject(&pump);
pump.GetBitmap(&bm);
CRect rect;
GetClientRect(&rect);
pdc->BitBlt(0,0,rect.Width(),rect.Height(),&dcCompatible,0,0,SRCCOPY);
ReleaseDC(&dcCompatible);
}
运行结果发生错误提示:
Debug Assertion Failed!
file:wingdi.cpp
。。。。
请各位大侠赐教!
谢谢!!!!!!!!!