// Include ComCtl32.Lib in the project
// Include header for common controls
#include "commctrl.h"
// Be sure that the common controls are initialized before creating the dialog
InitCommonControls();
// Create Dialog including Progress Bar
// Set range
SendMessage(GetDlgItem(hWnd, IDC_PROGRESS), PBM_SETRANGE, 0, MAKELPARAM(0, 100));
// Set size of step
SendMessage(GetDlgItem(hWnd, IDC_PROGRESS), PBM_SETSTEP, (WPARAM)10, 0);
// Step one step
SendMessage(GetDlgItem(hWnd, IDC_PROGRESS), PBM_STEPIT, 0, 0);
|