#endif
#include "wx/generic/imaglist.h"
+#include "wx/icon.h"
//-----------------------------------------------------------------------------
// wxImageList
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
else
m_images.Append( new wxBitmap(bitmap) );
- return m_images.Number();
+ return m_images.Number()-1;
}
const wxBitmap *wxImageList::GetBitmap( int index ) const
{
wxNode *node = m_images.Nth( index );
- wxCHECK_MSG( node, (wxBitmap *) NULL, "wrong index in image list" );
+ wxCHECK_MSG( node, (wxBitmap *) NULL, T("wrong index in image list") );
return (wxBitmap*)node->Data();
}
{
wxNode *node = m_images.Nth( index );
- wxCHECK_MSG( node, FALSE, "wrong index in image list" );
+ wxCHECK_MSG( node, FALSE, T("wrong index in image list") );
wxBitmap* newBitmap = NULL;
if (bitmap.IsKindOf(CLASSINFO(wxIcon)))
{
wxNode *node = m_images.Nth( index );
- wxCHECK_MSG( node, FALSE, "wrong index in image list" );
+ wxCHECK_MSG( node, FALSE, T("wrong index in image list") );
m_images.DeleteNode( node );
wxNode *node = m_images.Nth( index );
- wxCHECK_MSG( node, FALSE, "wrong index in image list" );
+ wxCHECK_MSG( node, FALSE, T("wrong index in image list") );
wxBitmap *bm = (wxBitmap*)node->Data();
width = bm->GetWidth();
{
wxNode *node = m_images.Nth( index );
- wxCHECK_MSG( node, FALSE, "wrong index in image list" );
+ wxCHECK_MSG( node, FALSE, T("wrong index in image list") );
wxBitmap *bm = (wxBitmap*)node->Data();