Hi guys,
I need to load a bitmap image from the file and show it in the screen in MFC. The following code load the image from a resource but I want to load it from a file.
void CScViewView::OnDraw(CDC* pDC)
{
CScViewDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
The LoadBitmap function loads the specified bitmap resource from a module's executable file. This function has been superseded by the LoadImage function.
And LoadImage() can load from file.
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
Bookmarks