MFC provides the
CProgressCtrl class that helps to make the Windows progress bar control.
CProgressCtrl is derived directly from
Cwnd class and inherits the function of
Cwnd class. It can be created as a child control of any window and also you can use from the dialog resource template.
I need the control that shows graphical effect in changing the sound level, so I made this application which is presented to you. I used it in a voice graph application using different voices. Here I used timer to show the graphical effect of progress bar.
- Microsoft Visual C++ 6.0.
- Microsoft Windows 9x/2000/XP.
BOOL fRun = FALSE;
fRun = !fRun;
void CGraphProgressView::DoDataExchange(CDataExchange* pDX)
DDXControl(pDX, IDC_BUTTON1, btnRun);
DDX_Control(pDX, IDC_PROGRESS1, m_progress1);
DDX_Control(pDX, IDC_PROGRESS2, m_progress2);
DDX_Control(pDX, IDC_PROGRESS3, m_progress3);
DDX_Control(pDX, IDC_PROGRESS4, m_progress4);
DDX_Control(pDX, IDC_PROGRESS5, m_progress5);
DDX_Control(pDX, IDC_PROGRESS6, m_progress6);
DDX_Control(pDX, IDC_PROGRESS7, m_progress7);
DDX_Control(pDX, IDC_PROGRESS8, m_progress8);
DDX_Control(pDX, IDC_PROGRESS9, m_progress9);
DDX_Control(pDX, IDC_PROGRESS10, m_progress10);
DDX_Control(pDX, IDC_PROGRESS11, m_progress11);
DDX_Control(pDX, IDC_PROGRESS12, m_progress12);
DDX_Control(pDX, IDC_PROGRESS13, m_progress13);
DDX_Control(pDX, IDC_PROGRESS14, m_progress14);
DDX_Control(pDX, IDC_PROGRESS15, m_progress15);
I used the two methods of the
|It shows the step increment for a progress bar control.|
It advances the current position for a progress bar control by the step increment and redraws the bar to show the new position.
Using the MFC AppWizard (exe) application: choose the base class
CFormView, to make this application. Try to make it and enjoy.