int CWndComboBox::AddString( LPCTSTR lpszString )
{
int nNum = 0;
CRect rect = m_wndListBox.GetWindowRect( TRUE );
if( rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8 < g_Neuz.GetDeviceRect().bottom-48 )
{
rect.bottom = rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
nNum = m_wndListBox.AddString( lpszString );
}
else
return nNum = m_wndListBox.GetCount();
m_wndListBox.SetWndRect( rect );
return nNum;
}
Als nette Brotbeilage.