Manuel Hoeger
2010-02-16 17:33:49 UTC
Hi,
I tried to show a png Image using CImage ( Visual Studio 2008 prof )
It works pretty good, but only in Release Mode. If I run it in Debug Mode
there is a Message:
"Debug Assertion Failed!
Program: ....[..]\application.exe
File: g:[...]\atlimage.h
Line: 503
Expression: m_hbitmap == 0
[..]
if I ignore the message the picture is schown. How can I avoid this Failure
My Code:
BOOL OK;
LPCTSTR lpBitSource=_T("D:\\Daten\\Visual Studio
2008\\Projects\\LitLaunchTestbox\\LitLaunch\\brett1.png");
CRect rect;
GetClientRect(&rect);
CWindowDC pDC(this);
CDC dc;
OK=m_Image.Load(lpBitSource);
dc.CreateCompatibleDC(&pDC);
m_Image.Draw(pDC.m_hDC,CRect(&rect));
Thanks for answers.
Manu
I tried to show a png Image using CImage ( Visual Studio 2008 prof )
It works pretty good, but only in Release Mode. If I run it in Debug Mode
there is a Message:
"Debug Assertion Failed!
Program: ....[..]\application.exe
File: g:[...]\atlimage.h
Line: 503
Expression: m_hbitmap == 0
[..]
if I ignore the message the picture is schown. How can I avoid this Failure
My Code:
BOOL OK;
LPCTSTR lpBitSource=_T("D:\\Daten\\Visual Studio
2008\\Projects\\LitLaunchTestbox\\LitLaunch\\brett1.png");
CRect rect;
GetClientRect(&rect);
CWindowDC pDC(this);
CDC dc;
OK=m_Image.Load(lpBitSource);
dc.CreateCompatibleDC(&pDC);
m_Image.Draw(pDC.m_hDC,CRect(&rect));
Thanks for answers.
Manu