Fixed the issue that dynamic image name is not correctly applied in most meters. (Issue 157) An error message is now output to the log instead of showing the dialog box.

This commit is contained in:
spx
2010-06-03 14:14:53 +00:00
parent 7a919f35fc
commit c7cd612502
7 changed files with 256 additions and 69 deletions

View File

@ -67,11 +67,19 @@ void CMeterRotator::Initialize()
m_Bitmap = new Bitmap(m_ImageName.c_str());
Status status = m_Bitmap->GetLastStatus();
if(Ok != status)
{
DebugLog(L"Bitmap image not found: %s", m_ImageName.c_str());
delete m_Bitmap;
m_Bitmap = NULL;
}
}
else
{
if (m_Bitmap)
{
delete m_Bitmap;
m_Bitmap = NULL;
throw CError(std::wstring(L"Bitmap image not found: ") + m_ImageName, __LINE__, __FILE__);
}
}
}