Beispiel #1
0
void CInfo::AddString( const char* pszTxt, DWORD color, HNODE hFont, UINT uFormat )
{
	if( pszTxt == NULL )
	{
		Clear();		
		return;
	}

	SIZE sizeString = getFontTextExtent( hFont, pszTxt );

	m_iHeight += 18;//sizeString.cy + 5;

	if( m_iWidth < sizeString.cx + 5)
		m_iWidth = sizeString.cx + 5;

	if( strlen( pszTxt ) > m_uMaxSizeString )
		m_uMaxSizeString = strlen( pszTxt );


	CTString String;
	String.SetColor( color );
	String.SetString( pszTxt );
	String.SetFormat( uFormat );
	String.SetFont( hFont );
	m_listString.push_back( String );	
	AdjustPosition();
}