LoadImage
方法HBITMAP hBitmap;
hBitmap = (HBITMAP)::LoadImage( AfxGetInstanceHandle(),
strBmpName,
IMAGE_BITMAP,
0,
0,
LR_LOADFROMFILE|LR_CREATEDIBSECTION );
if (hBitmap == NULL)
{
DeleteObject(hPrintBitmap);
DeleteObject(m_hBitmap);
AfxMessageBox(_T("LoadImage失败!"));
return false;
}
CBitmap bmp;
bmp.Attach( hBitmap );
CImage
类CImage _image;
HRESULT hr = _image.Load(lpszPathName);
return SUCCEEDED(hr)? TRUE : FALSE;
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/wang_cong0214/article/details/47019105