您的位置:首页 > 其它

Iocomp控件教程之Percent Bar——百分比工具条控件

2016-04-17 02:03 369 查看
Percent Bar——百分比工具条控件(Percent Bar)以百分比形式显示每个项目内容所占的百分比比重。在设计时,可以用属性编辑器来添加和移除项目以及更改属性值。在运行时间,使用AddItem,RemoveItem,
ClearList和ItemCount用于添加或移除项目;使用ItemTitle, ItemColor和
ItemValue来更改属性值。LegendShowValue和 LegendShowPercent属性用于隐藏某个项目内容的图标符号和百分比数值

第一步:建立MFC对话框

第二步:插入ActiveX控件---Percent Bar控件



 

第三步:单击控件-鼠标右键-添加成员变量

 

可以通过修改属性获得不同的效果

主要函数介绍:(顾名思义,不再文字赘述)

voidSetItemTitle(longIndex,
LPCTSTRTitle)

voidSetItemColor(longIndex,
unsigned long
Color)

voidSetItemValue(longIndex,
double Value)

voidput_LegendShowPercent(BOOLnewValue)

voidput_LegendValuePrecision(longnewValue)

voidput_LegendShowValue(BOOLnewValue)

voidAddItem(LPCTSTRTitle,
unsigned long
Color, doubleValue)

voidRemoveItem(longIndex)

voidClearList()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Iocomp