Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / misc / data_mirror / progress_dialog.cpp
blob50f96b95499f5418222299e4771c126d9c8c6fc0
1 // progress_dialog.cpp : implementation file
2 //
4 #include "stdafx.h"
5 #include "data_mirror.h"
6 #include "progress_dialog.h"
8 /////////////////////////////////////////////////////////////////////////////
9 // CProgressDialog dialog
12 #define BAR_MAX 1000
14 CProgressDialog::CProgressDialog(CWnd* pParent /*=NULL*/)
15 : CDialog(CProgressDialog::IDD, pParent)
17 //{{AFX_DATA_INIT(CProgressDialog)
18 Text = _T("");
19 //}}AFX_DATA_INIT
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);
29 //}}AFX_DATA_MAP
33 BEGIN_MESSAGE_MAP(CProgressDialog, CDialog)
34 //{{AFX_MSG_MAP(CProgressDialog)
35 //}}AFX_MSG_MAP
36 END_MESSAGE_MAP()
38 /////////////////////////////////////////////////////////////////////////////
39 // CProgressDialog message handlers
41 void CProgressDialog::progress (float progressValue)
43 UpdateData ();
45 float value = getCropedValue (progressValue);
46 Text = DisplayString.c_str ();
47 Bar.SetPos ((uint) (value * (float)BAR_MAX));
49 UpdateData (FALSE);
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