X-Git-Url: http://git.osdn.net/view?p=tpi%2Flychee.git;a=blobdiff_plain;f=src%2Flychee%2Fdlg_process.cpp;h=1ee6204c9813f33cdedf1c274205fa279118293f;hp=bc81267117496a005801ee84089c6afc6fe71bed;hb=b4a642b33db5df1bb2661b53144508b78390d527;hpb=be5981e42f8772ec9b9ad8b4428a7cdc3b8ce25d diff --git a/src/lychee/dlg_process.cpp b/src/lychee/dlg_process.cpp index bc81267..1ee6204 100644 --- a/src/lychee/dlg_process.cpp +++ b/src/lychee/dlg_process.cpp @@ -25,7 +25,7 @@ #include "frm_main.h" #include "functions.h" -ProcessDialog * g_procDlg = NULL; +ProcessDialog * g_procDlg = nullptr; //****************************************************************************** // ProcessDialog @@ -59,14 +59,14 @@ ProcessDialog::~ProcessDialog() } #ifdef __WINDOWS__ - if (this->tlTaskbar != NULL) + if (this->tlTaskbar != nullptr) { this->tlTaskbar->SetProgressState(this->hTBWnd, TBPF_NOPROGRESS); this->tlTaskbar->Release(); } #endif ((MainFrame *) this->hParent)->gFrame->Show(false); - g_procDlg = NULL; + g_procDlg = nullptr; } //****************************************************************************** @@ -126,8 +126,8 @@ void ProcessDialog::OnInit(wxInitDialogEvent &) // タスクバー。 this->hTBWnd = frm_main->GetHandle(); - ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void **) & this->tlTaskbar); - if (this->tlTaskbar != NULL) + ::CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void **) & this->tlTaskbar); + if (this->tlTaskbar != nullptr) { this->tlTaskbar->HrInit(); } @@ -151,7 +151,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) } TPI_PROCESSINFO * piInfo = (TPI_PROCESSINFO *) _pStructure; - if (piInfo == NULL) + if (piInfo == nullptr) { return TPI_CALLBACK_CONTINUE; } @@ -199,7 +199,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) ((MainFrame *) this->hParent)->gFrame->SetValue(s_nProcess); } #ifdef __WINDOWS__ - if (this->tlTaskbar != NULL) + if (this->tlTaskbar != nullptr) { this->tlTaskbar->SetProgressValue(this->hTBWnd, s_nProcess, s_nFileCount); } @@ -242,7 +242,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) } ((MainFrame *) this->hParent)->gFrame->SetValue(piInfo->nProcessedSize); #ifdef __WINDOWS__ - if (this->tlTaskbar != NULL) + if (this->tlTaskbar != nullptr) { this->tlTaskbar->SetProgressValue(this->hTBWnd, piInfo->nProcessedSize, s_nFileCount); } @@ -254,7 +254,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) case TPI_MESSAGE_ASK: { #ifdef __WINDOWS__ - if (this->tlTaskbar != NULL) + if (this->tlTaskbar != nullptr) { this->tlTaskbar->SetProgressState(this->hTBWnd, TBPF_PAUSED); } @@ -343,7 +343,7 @@ int ProcessDialog::CallbackProc(unsigned int _uMsg, void * _pStructure) return TPI_CALLBACK_UNSUPPORTED; } #ifdef __WINDOWS__ - if (this->tlTaskbar != NULL) + if (this->tlTaskbar != nullptr) { this->tlTaskbar->SetProgressState(this->hTBWnd, TBPF_NORMAL); } @@ -445,5 +445,5 @@ void OverwriteDialog::OnBtnBrowse(wxCommandEvent&) int __stdcall TPICallbackProc(unsigned int _uMsg, void * _pStructure) { - return g_procDlg == NULL ? TPI_CALLBACK_CONTINUE : g_procDlg->CallbackProc(_uMsg, _pStructure); + return g_procDlg == nullptr ? TPI_CALLBACK_CONTINUE : g_procDlg->CallbackProc(_uMsg, _pStructure); }