Index: src/ch/StatusDlg.cpp =================================================================== diff -u -rd4064fca634707dcae112e5a41ed37e04455dc2a -r8068e0c351055554340ac9755d1bc846893bf2b8 --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision d4064fca634707dcae112e5a41ed37e04455dc2a) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 8068e0c351055554340ac9755d1bc846893bf2b8) @@ -28,6 +28,7 @@ #include "Structs.h" #include "../libchcore/TTaskStatsSnapshot.h" #include "../libchcore/TTaskManagerStatsSnapshot.h" +#include "CfgProperties.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -40,8 +41,8 @@ ///////////////////////////////////////////////////////////////////////////// // CStatusDlg dialog -CStatusDlg::CStatusDlg(chcore::TTaskManager* pTasks, CWnd* pParent /*=NULL*/) - : ictranslate::CLanguageDialog(CStatusDlg::IDD, pParent, &m_bLock), +CStatusDlg::CStatusDlg(chcore::TTaskManager* pTasks, CWnd* pParent /*=nullptr*/) + : ictranslate::CLanguageDialog(IDD_STATUS_DIALOG, pParent, &m_bLock), m_spTaskMgrStats(new chcore::TTaskManagerStatsSnapshot), m_pTasks(pTasks) { @@ -170,7 +171,7 @@ } // refresh data timer - SetTimer(777, GetPropValue(GetConfig()), NULL); + SetTimer(777, GetPropValue(GetConfig()), nullptr); return TRUE; } @@ -220,7 +221,7 @@ RefreshStatus(); // reenable - SetTimer(777, GetPropValue(GetConfig()), NULL); + SetTimer(777, GetPropValue(GetConfig()), nullptr); } CLanguageDialog::OnTimer(nIDEvent); @@ -282,7 +283,7 @@ SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen, 0); GetWindowRect(&rect); - SetWindowPos(NULL, rcScreen.right-rect.Width(), + SetWindowPos(nullptr, rcScreen.right-rect.Width(), rcScreen.bottom-rect.Height(), rect.Width(), rect.Height(), SWP_NOOWNERZORDER | SWP_NOZORDER); } @@ -293,7 +294,7 @@ chcore::TTaskPtr spSelectedTask = GetSelectedItemPointer(); // set status of buttons pause/resume/cancel - if (spSelectedTask != NULL) + if (spSelectedTask != nullptr) { if(spSelectedTask->GetTaskState() == chcore::eTaskState_LoadError) { @@ -359,7 +360,7 @@ } CMenu* pPopup = menu.GetSubMenu(0); - ASSERT(pPopup != NULL); + ASSERT(pPopup != nullptr); if(pPopup) { // set point in which to set menu @@ -381,7 +382,7 @@ } CMenu* pPopup = menu.GetSubMenu(0); - ASSERT(pPopup != NULL); + ASSERT(pPopup != nullptr); if(pPopup) { // set point in which to set menu @@ -401,7 +402,7 @@ // processing priority chcore::TTaskPtr spSelectedTask = GetSelectedItemPointer(); - if(spSelectedTask == NULL) + if(spSelectedTask == nullptr) return ictranslate::CLanguageDialog::OnCommand(wParam, lParam); switch (LOWORD(wParam)) @@ -441,7 +442,7 @@ // processing priority chcore::TTaskPtr spSelectedTask = GetSelectedItemPointer(); - if(spSelectedTask == NULL) + if(spSelectedTask == nullptr) return ictranslate::CLanguageDialog::OnCommand(wParam, lParam); spSelectedTask->RestoreFeedbackDefaults(); @@ -702,7 +703,7 @@ if(!spTask) return; - ULONG_PTR hResult = (ULONG_PTR)ShellExecute(this->m_hWnd, _T("open"), _T("notepad.exe"), spTask->GetLogPath().ToString(), NULL, SW_SHOWNORMAL); + ULONG_PTR hResult = (ULONG_PTR)ShellExecute(this->m_hWnd, _T("open"), _T("notepad.exe"), spTask->GetLogPath().ToString(), nullptr, SW_SHOWNORMAL); if(hResult < 32) { ictranslate::CFormat fmt(GetResManager().LoadString(IDS_SHELLEXECUTEERROR_STRING)); @@ -1089,8 +1090,8 @@ // avg transfer CString strFmt; - strFmt.Format(_T("%s/s (%s%s/s); %.0f/s (%s%.0f/s)"), strSpeedText, strAvgWord, strAvgSpeedText, - dCountSpeed, strAvgWord, dAvgCountSpeed); + strFmt.Format(_T("%s/s (%s%s/s); %.0f/s (%s%.0f/s)"), (PCTSTR)strSpeedText, (PCTSTR)strAvgWord, (PCTSTR)strAvgSpeedText, + dCountSpeed, (PCTSTR)strAvgWord, dAvgCountSpeed); return strFmt; } @@ -1185,7 +1186,7 @@ CString strTime3 = FormatTimeMiliseconds(timeRemaining); CString strTime; - strTime.Format(_T("%s / %s (%s)"), strTime1, strTime2, strTime3); + strTime.Format(_T("%s / %s (%s)"), (PCTSTR)strTime1, (PCTSTR)strTime2, (PCTSTR)strTime3); GetDlgItem(IDC_TASKTIME_STATIC)->SetWindowText(strTime); // set progress