X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64698f9af83fd51d3080a0e6fb3789e9f75b4958..acb8423c2b0b55b75e2551d67815bed345f684cd:/src/generic/imaglist.cpp diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 8190aff018..8011b2b648 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -55,14 +55,14 @@ int wxImageList::Add( const wxBitmap &bitmap ) 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, _T("wrong index in image list") ); + wxCHECK_MSG( node, (wxBitmap *) NULL, wxT("wrong index in image list") ); return (wxBitmap*)node->Data(); } @@ -71,7 +71,7 @@ bool wxImageList::Replace( int index, const wxBitmap &bitmap ) { wxNode *node = m_images.Nth( index ); - wxCHECK_MSG( node, FALSE, _T("wrong index in image list") ); + wxCHECK_MSG( node, FALSE, wxT("wrong index in image list") ); wxBitmap* newBitmap = NULL; if (bitmap.IsKindOf(CLASSINFO(wxIcon))) @@ -98,7 +98,7 @@ bool wxImageList::Remove( int index ) { wxNode *node = m_images.Nth( index ); - wxCHECK_MSG( node, FALSE, _T("wrong index in image list") ); + wxCHECK_MSG( node, FALSE, wxT("wrong index in image list") ); m_images.DeleteNode( node ); @@ -119,7 +119,7 @@ bool wxImageList::GetSize( int index, int &width, int &height ) const wxNode *node = m_images.Nth( index ); - wxCHECK_MSG( node, FALSE, _T("wrong index in image list") ); + wxCHECK_MSG( node, FALSE, wxT("wrong index in image list") ); wxBitmap *bm = (wxBitmap*)node->Data(); width = bm->GetWidth(); @@ -133,7 +133,7 @@ bool wxImageList::Draw( int index, wxDC &dc, int x, int y, { wxNode *node = m_images.Nth( index ); - wxCHECK_MSG( node, FALSE, _T("wrong index in image list") ); + wxCHECK_MSG( node, FALSE, wxT("wrong index in image list") ); wxBitmap *bm = (wxBitmap*)node->Data();