19,468
社区成员
发帖
与我相关
我的任务
分享
if (is_load_image_file_ == false)
{
image_.Load("c:\\test.png");
is_load_image_file_ = true;
}
else
{
// AfxMessageBox("xxxx");
// 显示到页面中
HDC hdc;
hdc = pdc->m_hDC;
if (!image_.IsNull())
{
RECT imgRc2 = { 0, 0, image_.GetWidth(), image_.GetHeight() };
image_.Draw(hdc, rcBounds, imgRc2);
}
}
没调好Dest和Src,比如上面的代码时可行的;
image_.Draw(hdc, 0, 0);也是可行的
image_.Draw(hdc, rcBounds, rcBounds);却是不对的,因为Src那里不能读取出来,造成NULL