ja kompliert ohne porblem aber es ziegt mir jetzt kein Not Connected merh an!
habe nur an ein beispiel gestestet
habe nur an ein beispiel gestestet
Code:
//**************************************************************************************
// FUNCTION: - UpdateConnectionStatus()
// RETURNS: -
// PARAMETERS: -
// COMMENTS: - Draws the right stuff on the status bar for connections..
//**************************************************************************************
LRESULT CMUTEMFC2Dlg::UpdateConnectionStatus(WPARAM, LPARAM lParam)
{
CString str;
m_ulLastNumOfConnections = (unsigned long) lParam;
str.Format( "%d ", m_ulLastNumOfConnections );
str += m_ExtStr.LoadString( IDS_TAB_TITLE_CONNECTIONS_TEXT_ENG + g_unStringLanguageIdOffset );
m_oConnectionStatusLabel.SetText( str );
if( 0 == m_ulLastNumOfConnections )
{
m_oConnectionStatusLabel.SetBkColor( colRed );
statusbar.SetIcon(3,connicons[0]);
//statusbar.SetText(GetResString(IDS_NOTCONNECTED),3,0);
//statusbar.SetText(GetResString(IDS_MUTENET)+":"+ "Not Connected",3,0);
CString string=GetResString(IDS_MUTENET);
string+=":";
}
else if( 1 == m_ulLastNumOfConnections )
{
m_oConnectionStatusLabel.SetBkColor( colYellow2 );
statusbar.SetIcon(3,connicons[1]);
//statusbar.SetText(GetResString(IDS_CONNECTED),3,0);
//statusbar.SetText(GetResString(IDS_MUTENET)+":"+ "Connected",3,0);
//CString string=GetResString(IDS_MUTENET)+":"+IDS_CONNECTED,3,0);
//statusbar.SetText(string,3,0);
}
else
{
m_oConnectionStatusLabel.SetBkColor( colGreen );
statusbar.SetIcon(3,connicons[2]);
//statusbar.SetText(GetResString(IDS_CONNECTED),3,0);
//statusbar.SetText(GetResString(IDS_MUTENET)+":"+ "Connected",3,0);
//CString string=GetResString(IDS_MUTENET)+":"+IDS_CONNECTED,3,0);
//statusbar.SetText(string,3,0);
}
m_oConnectionStatusLabel.Invalidate();
return (LRESULT) TRUE;
}