本文整理汇总了C++中ProgressDialog::DoModal方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgressDialog::DoModal方法的具体用法?C++ ProgressDialog::DoModal怎么用?C++ ProgressDialog::DoModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog::DoModal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnFileDefrag
void CMainFrame::OnFileDefrag()
{
CzpEditorDoc* document = (CzpEditorDoc*)GetActiveDocument();
ZpExplorer& explorer = document->GetZpExplorer();
if (!explorer.isOpen())
{
return;
}
//zp::u64 fragSize = explorer.getPack()->countFragmentSize();
//if (fragSize == 0)
//{
// ::MessageBox(NULL, _T("No fragment found in package."), _T("Note"), MB_OK | MB_ICONINFORMATION);
// return;
//}
//StringStream tip;
//tip << _T("You can save ") << fragSize << _T(" bytes, continue?");
if (::MessageBox(NULL, _T("It will take minutes for large package, continue?"), _T("Note"), MB_YESNO | MB_ICONQUESTION) != IDYES)
{
return;
}
ProgressDialog progressDlg;
progressDlg.m_explorer = &(document->GetZpExplorer());
progressDlg.m_running = true;
progressDlg.m_params = NULL;
progressDlg.m_operation = ProgressDialog::OP_DEFRAG;
progressDlg.m_totalFileSize = explorer.countNodeFileSize(explorer.rootNode());
progressDlg.DoModal();
}
示例2: startOperation
void CzpEditorView::startOperation(ProgressDialog::Operation op, zp::u64 totalFileSize,
const std::vector<std::pair<zp::String, zp::String>>* params)
{
ProgressDialog progressDlg;
progressDlg.m_explorer = &(GetDocument()->GetZpExplorer());
progressDlg.m_running = true;
progressDlg.m_params = params;
progressDlg.m_operation = op;
progressDlg.m_totalFileSize = totalFileSize;
progressDlg.DoModal();
}