wxString wxLocale::GetHeaderValue( const wxChar* szHeader,
const wxChar* szDomain ) const
{
- if ( wxIsEmpty(Header) )
+ if ( wxIsEmpty(szHeader) )
return wxEmptyString;
wxChar const * pszTrans = NULL;
if ( wxIsEmpty(pszTrans) )
return wxEmptyString;
- wxChar const * pszFound = wxStrstr(pszTrans, Header);
+ wxChar const * pszFound = wxStrstr(pszTrans, szHeader);
if ( pszFound == NULL )
return wxEmptyString;
- pszFound += wxStrlen(Header) + 2 /* ': ' */;
+ pszFound += wxStrlen(szHeader) + 2 /* ': ' */;
// Every header is separated by \n
long wxListMainWindow::FindItem( const wxPoint& pt )
{
- wxPoint p;
- long topItem = GetTopItem();
+ size_t topItem;
+ GetVisibleLinesRange(&topItem, NULL);
- GetItemPosition( GetItemCount()-1, p );
- if( p.y == 0 )
- return topItem;
- long id = (long) floor( pt.y*(GetItemCount()-topItem-1)/p.y+topItem );
- if( id >= 0 && id < (long)GetItemCount() )
- return id;
+ wxPoint p;
+ GetItemPosition( GetItemCount()-1, p );
+ if( p.y == 0 )
+ return topItem;
+ long id = (long) floor( pt.y*(GetItemCount()-topItem-1)/p.y+topItem );
+ if( id >= 0 && id < (long)GetItemCount() )
+ return id;
- return wxNOT_FOUND;
+ return wxNOT_FOUND;
}
long wxListMainWindow::HitTest( int x, int y, int &flags )