Hi,
Does anyone know how the disk space 3D pie charts from viewing a drive's properties in Explorer are drawn? Is there an API function or DLL that would allow me to do this?
Printable View
Hi,
Does anyone know how the disk space 3D pie charts from viewing a drive's properties in Explorer are drawn? Is there an API function or DLL that would allow me to do this?
I know there is an ActiveX control that does it. Sorrry I don't remeber it's name or where it is to be found.
~Barjor
Use GetDiskFreeSpace() or GetDiskFreeSpaceEx() to get the number of bytes on the disk and the number of free bytes.
Basic maths will give you your pie chart angles. Then use GDI functions to draw and fill your pie chart.
Way to go Stoned_Coder... people should do it themselvs more often on this board!
SPH :rolleyes: :p :rolleyes:
Pffft, I'm already doing that! :rolleyes: :D
But there doesn't seem to be any GDI functions to draw 3D pies. I would concoct a rather weird procedure involving drawing the same pie several times (incrementing the y coords to give the pie depth), but that sounds too much like hard work for both me and my CPU :p
Not really, just 1 pie, then draw a little curve thing under it (of the same degree as the pie's edge), workx like a charm :).
SPH :p
P.S. If you really want it to look good, draw little lines down from the "ends" of the "peice of pie division lines" down to thier correspondent pixel on the 'little curv thing', and if you really wanna get fancy, fill the dived areas in between the 'little curve thing' and the pie chart.
P.S.S. You may even consider scaling the pie chart as you draw.. to create a "depth" effect... Simple formulas, but they make a BIG difference. :p