程序如下,将位图贴到客户区:
CBitmap bitmap;
bitmap.LoadBitmap(IDB_BACKGROUND);
BITMAP bmp;
bitmap.GetBitmap(&bmp);
CDC dcCompatible;
dcCompatible.CreateCompatibleDC(pDC);
dcCompatible.SelectObject(&bitmap);
CRect rect;
GetClientRect(&rect);
pDC->StretchBlt(0,0,rect.Width(),rect.Height(),&dcCompatible,0,0,bmp.bmWidth(),bmp.bmHeight(),SRCCOPY);
编译时最后一行出现2个如下错误:
error C2064: term does not evaluate to a function
error C2064: term does not evaluate to a function
请问高手怎么解决?谢谢
bmp.bmWidth(),bmp.bmHeight(),
BITMAP 是一个结构,没有提供函数吧。
应该是
bmp.bmWidth,bmp.bmHeight,