summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog/CMakeSetupDialog.cpp
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-26 19:14:20 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-26 19:14:20 (GMT)
commitc751d2ebff5b95b0f00c09ef6203d70f323c8144 (patch)
treed52b04bd774d9d6d4ba27ec633249f52c7253f52 /Source/MFCDialog/CMakeSetupDialog.cpp
parent85896b3460f3e1276dec6ad67d63df26e65d16e2 (diff)
downloadCMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.zip
CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.tar.gz
CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.tar.bz2
added progress
Diffstat (limited to 'Source/MFCDialog/CMakeSetupDialog.cpp')
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index 11324c8..fc8ccd6 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -103,6 +103,20 @@ void MFCMessageCallback(const char* m, const char* title, bool& nomore, void*)
/////////////////////////////////////////////////////////////////////////////
// CMakeSetupDialog dialog
+void updateProgress(const char *msg, float prog, void *cd)
+{
+ char tmp[1024];
+ if (prog >= 0)
+ {
+ sprintf(tmp,"%s %i%%",msg,(int)(100*prog));
+ }
+ else
+ {
+ sprintf(tmp,"%s",msg);
+ }
+ CMakeSetupDialog *self = (CMakeSetupDialog *)cd;
+ self->SetDlgItemText(IDC_PROGRESS, tmp);
+}
CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
CWnd* pParent /*=NULL*/)
@@ -147,6 +161,8 @@ CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
m_oldCX = -1;
m_deltaXRemainder = 0;
m_CMakeInstance = new cmake;
+ m_CMakeInstance->SetProgressCallback(updateProgress, (void *)this);
+
}
void CMakeSetupDialog::DoDataExchange(CDataExchange* pDX)
@@ -268,6 +284,7 @@ BOOL CMakeSetupDialog::OnInitDialog()
sprintf(tmp,"Version %d.%d - %s", cmake::GetMajorVersion(),
cmake::GetMinorVersion(), cmake::GetReleaseVersion());
SetDlgItemText(IDC_CMAKE_VERSION, tmp);
+ SetDlgItemText(IDC_PROGRESS, "");
this->UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
}