
正文
Iocomp控件教程之Pie Chart——饼状图控件
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
Pie Chart——饼状图控件(Pie Chart)以饼状图形式显示每一个项目内容所占的百分比比重。在设计时。能够使用属性编辑器加入或者移除项目以及更改属性值。在执行时。使用AddItem,RemoveItem,
ClearList和ItemCount用于加入或移除项目;使用ItemTitle, ItemColor和
ItemValue来更改属性值。
LegendShowValue和 LegendShowPercent属性用于隐藏某个项目内容的图标符号和百分比数值。
第一步:建立MFC对话框
第二步:插入ActiveX控件---Pie Chart控件
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
第三步:单击控件-鼠标右键-加入成员变量
能够通过改动属性获得不同的效果
主要函数介绍:(顾名思义。不再文字赘述)
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()







