@@ -1400,6 +1400,24 @@ void CMainFrame::Pause()
14001400 m_logSources.AddMessage (" <paused>" );
14011401}
14021402
1403+ void CMainFrame::UpdateTitle ()
1404+ {
1405+ std::wstring title = L" Paused" ;
1406+ if ((m_pLocalReader != nullptr ) && (m_pGlobalReader != nullptr ))
1407+ {
1408+ title = L" Capture Win32 & Global Win32 Messages" ;
1409+ }
1410+ else if (m_pLocalReader != nullptr )
1411+ {
1412+ title = L" Capture Win32" ;
1413+ }
1414+ else if (m_pGlobalReader != nullptr )
1415+ {
1416+ title = L" Capture Global Win32" ;
1417+ }
1418+ SetTitle (title);
1419+ }
1420+
14031421void CMainFrame::Resume ()
14041422{
14051423 SetTitle ();
@@ -1438,21 +1456,7 @@ void CMainFrame::Resume()
14381456 m_tryGlobal = false ;
14391457 }
14401458 }
1441-
1442- std::wstring title = L" Paused" ;
1443- if ((m_pLocalReader != nullptr ) && (m_pGlobalReader != nullptr ))
1444- {
1445- title = L" Capture Win32 & Global Win32 Messages" ;
1446- }
1447- else if (m_pLocalReader != nullptr )
1448- {
1449- title = L" Capture Win32" ;
1450- }
1451- else if (m_pGlobalReader != nullptr )
1452- {
1453- title = L" Capture Global Win32" ;
1454- }
1455- SetTitle (title);
1459+ UpdateTitle ();
14561460}
14571461
14581462void CMainFrame::OnLogPause (UINT /* uNotifyCode*/ , int /* nID*/ , CWindow /* wndCtl*/ )
@@ -1480,6 +1484,7 @@ void CMainFrame::OnLogGlobal(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wndCtl
14801484 m_logSources.Remove (m_pGlobalReader);
14811485 m_pGlobalReader = nullptr ;
14821486 }
1487+ UpdateTitle ();
14831488}
14841489
14851490void CMainFrame::OnLogHistory (UINT /* uNotifyCode*/ , int /* nID*/ , CWindow /* wndCtl*/ )
0 commit comments