Connection indicator on status bar repaired
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 31 Jan 2005 14:14:01 +0000 (14:14 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 31 Jan 2005 14:14:01 +0000 (14:14 +0000)
src/console/win32/MainFrm.cpp
src/console/win32/comm.cpp

index d6032ea..8eab995 100644 (file)
@@ -192,7 +192,7 @@ void CMainFrame::OnUpdateEventList(void)
 
 void CMainFrame::OnStateChange(WPARAM wParam, LPARAM lParam)
 {
-   if (wParam == STATE_CONNECTED)
+   if (wParam)
    {
       m_wndStatusBar.GetStatusBarCtrl().SetIcon(1, 
          (HICON)LoadImage(theApp.m_hInstance, MAKEINTRESOURCE(IDI_CONNECT), 
index b2b901c..2720fdc 100644 (file)
@@ -99,6 +99,7 @@ static DWORD WINAPI LoginThread(void *pArg)
    // If successful, load container objects' categories
    if (dwResult == RCC_SUCCESS)
    {
+      theApp.GetMainWnd()->PostMessage(WM_STATE_CHANGE, TRUE, 0);
       NXCSetEventHandler(g_hSession, ClientEventHandler);
 
       SetInfoText(hWnd, "Loading container categories...");
@@ -187,6 +188,7 @@ static DWORD WINAPI LoginThread(void *pArg)
    // Disconnect if some of post-login operations was failed
    if (dwResult != RCC_SUCCESS)
    {
+      theApp.GetMainWnd()->PostMessage(WM_STATE_CHANGE, FALSE, 0);
       NXCDisconnect(g_hSession);
       g_hSession = NULL;
    }