2 * PROJECT: ReactOS Services
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/applications/mscutils/servman/progress.c
5 * PURPOSE: Progress dialog box message handler
6 * COPYRIGHT: Copyright 2006-2007 Ged Murphy <gedmurphy@reactos.org>
12 #define PROGRESSRANGE 20
15 CompleteProgressBar(HWND hProgDlg
)
19 hProgBar
= GetDlgItem(hProgDlg
,
20 IDC_SERVCON_PROGRESS
);
26 pos
= SendMessage(hProgBar
,
31 for (; pos
<= PROGRESSRANGE
; pos
++)
43 IncrementProgressBar(HWND hProgDlg
)
47 hProgBar
= GetDlgItem(hProgDlg
,
48 IDC_SERVCON_PROGRESS
);
60 ProgressDialogProc(HWND hDlg
,
71 /* set the progress bar range and step */
72 hProgBar
= GetDlgItem(hDlg
,
73 IDC_SERVCON_PROGRESS
);
77 MAKELPARAM(0, PROGRESSRANGE
));
87 switch(LOWORD(wParam
))
105 CreateProgressDialog(HWND hParent
,
106 LPTSTR lpServiceName
,
110 TCHAR ProgDlgBuf
[100];
112 /* open the progress dialog */
113 hProgDlg
= CreateDialog(hInstance
,
114 MAKEINTRESOURCE(IDD_DLG_PROGRESS
),
117 if (hProgDlg
!= NULL
)
119 /* write the info to the progress dialog */
120 LoadString(hInstance
,
123 sizeof(ProgDlgBuf
) / sizeof(TCHAR
));
125 SendDlgItemMessage(hProgDlg
,
131 /* write the service name to the progress dialog */
132 SendDlgItemMessage(hProgDlg
,
136 (LPARAM
)lpServiceName
);