none
Chart/Graph controls for Desktop Apps RRS feed

  • Question

  • Hello everyone,

    I would just like to know how to create a chart or graph control in a simple C++ win32 desktop app without using any third-party code/API. I just want to create a chart control in my app that looks like the chart controls of Windows 8.1 Task Manager. I believe all of these chart controls are from chartv.dll which resides in system32. Hoping for your kind replies, Thanks!

    Thursday, June 19, 2014 4:00 AM

Answers

  • I think that such charts can be drawn using LineTo function from GDI or DrawLine from GDI+.

    Or consider the Chart control from .NET Framework, which is available in modern Operating Systems. To use it, create a project of CLR type.

    Thursday, June 19, 2014 5:15 AM
  • Is there a way of doing this in native C++ win32 desktop program? How come Microsoft's apps always look different? Do they use "secret" APIs? or libraries for this beautiful-looking chart controls?

    I doubt they use a "secret" library to do that drawing.  Did they write their own code to draw that graph?  Probably -- but they used standard APIs to do so.  Since that particular tab is rewritten for Windows 8, odds are pretty good that they used Direct 2D to do that drawing.  It would also be fairly easy to do with GDI+ which is an old technology since Windows XP days.  If I were using GDI+,  DrawPolygon and FillPolygon would suffice, along with a few calls to DrawLine.

    There is plenty of documentation on MSDN on how to write your own custom Windows control and once you have that you can draw whatever you whnt on the top of it


    Monday, June 23, 2014 2:16 PM

All replies

  • I think that such charts can be drawn using LineTo function from GDI or DrawLine from GDI+.

    Or consider the Chart control from .NET Framework, which is available in modern Operating Systems. To use it, create a project of CLR type.

    Thursday, June 19, 2014 5:15 AM
  • Is there a way of doing this in native C++ win32 desktop program? How come Microsoft's apps always look different? Do they use "secret" APIs? or libraries for this beautiful-looking chart controls?
    Thursday, June 19, 2014 6:40 AM
  • Hi,

    Please reopen a new thread in General Windows Desktop Development Issues forum for better response.

    Best regards,

    Monday, June 23, 2014 12:55 PM
  • Is there a way of doing this in native C++ win32 desktop program? How come Microsoft's apps always look different? Do they use "secret" APIs? or libraries for this beautiful-looking chart controls?

    I doubt they use a "secret" library to do that drawing.  Did they write their own code to draw that graph?  Probably -- but they used standard APIs to do so.  Since that particular tab is rewritten for Windows 8, odds are pretty good that they used Direct 2D to do that drawing.  It would also be fairly easy to do with GDI+ which is an old technology since Windows XP days.  If I were using GDI+,  DrawPolygon and FillPolygon would suffice, along with a few calls to DrawLine.

    There is plenty of documentation on MSDN on how to write your own custom Windows control and once you have that you can draw whatever you whnt on the top of it


    Monday, June 23, 2014 2:16 PM
  • Thanks! I think I'm going to go with Direct2D. :)
    Tuesday, June 24, 2014 5:12 AM
  • Hello,

    Look at the chartv.dll in System32 directory, that is the library used to create chart in the windows taskmanager... But, normally, it's a standard C++ dll, not a 3rd party software...

    Good luck!

    Orion

    • Proposed as answer by Orion Dev Sunday, January 11, 2015 11:52 AM
    Sunday, November 23, 2014 10:04 AM