1 // progress_dialog.cpp : implementation file
5 #include "data_mirror.h"
6 #include "progress_dialog.h"
8 /////////////////////////////////////////////////////////////////////////////
9 // CProgressDialog dialog
14 CProgressDialog::CProgressDialog(CWnd
* pParent
/*=NULL*/)
15 : CDialog(CProgressDialog::IDD
, pParent
)
17 //{{AFX_DATA_INIT(CProgressDialog)
23 void CProgressDialog::DoDataExchange(CDataExchange
* pDX
)
25 CDialog::DoDataExchange(pDX
);
26 //{{AFX_DATA_MAP(CProgressDialog)
27 DDX_Control(pDX
, IDC_PROGRESS
, Bar
);
28 DDX_Text(pDX
, IDC_TEXT
, Text
);
33 BEGIN_MESSAGE_MAP(CProgressDialog
, CDialog
)
34 //{{AFX_MSG_MAP(CProgressDialog)
38 /////////////////////////////////////////////////////////////////////////////
39 // CProgressDialog message handlers
41 void CProgressDialog::progress (float progressValue
)
45 float value
= getCropedValue (progressValue
);
46 Text
= DisplayString
.c_str ();
47 Bar
.SetPos ((uint
) (value
* (float)BAR_MAX
));
52 BOOL
CProgressDialog::OnInitDialog()
54 CDialog::OnInitDialog();
56 Bar
.SetRange (0, BAR_MAX
);
58 return TRUE
; // return TRUE unless you set the focus to a control
59 // EXCEPTION: OCX Property Pages should return FALSE