ATLProcessCtrl——ProcessCtrl
1、Properties
1) 进度条显示的最大值
short ProcessRange; (put only)
2) 是否显示进度百分比数字
short ShowProcessNumber; (put only)
3) 文本颜色
long TextForeColor; (get/put)
4) 文本背景颜色
long TextBackgroundColor; (get/put)
5) 渐变开始颜色
long ShadowBeginColor; (get/put)
6)渐变结束颜色
long ShadowEndColor; (get/put)
2、Methods
1) 显示进度
HRESULT ShowProcess(long nCurrentValue);
参数:long nCurrentValue——目前显示的数字,最大不能超过百分比显示精度
说明:内部处理应该显示的百分比
返回:S_OK——运行正常
S_FALSE——运行错误
2) 显示进度2
HRESULT ShowPercent(short nPercent);
参数:short nPercent——欲显示的百分比,范围:0-100,否则非法,以0处理
说明:直接显示,相当于系统提供两种百分比的显示方式
返回:S_OK——运行正常
S_FALSE——运行错误
3) 获取错误信息
HRESULT GetErrorMessage(long nErrCode , [out]BSTR* pbstrErrMsg);
参数:long nErrCode——错误代码
BSTR* pbstrErrMsg——错误信息描述
返回:S_OK——运行正常
S_FALSE——运行错误
3、Events
1) 运行错误
HRESULT RunError(long nErrCode);
参数:long nErrCode——运行错误值