I need some help with writing a programm with GUI.

5469810 21 Reputation points
2021-11-12T01:38:47.7+00:00

It supposed to accept user input. User have to fill the table(adjacency matrix) like so:

148665-screenshot-25.png

The max amount of nodes would be 10 or so.
Then you should be able to press something like "plot graph" button and it draws the appropriate graph for you:

148580-screenshot-26.png

The problem is how can i draw a graph?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,850 questions
{count} votes

Accepted answer
  1. Castorix31 86,971 Reputation points
    2021-11-12T12:20:05.5+00:00

    In C++/CLI (CLR), you can use MSAGL
    (add references to Microsoft.Msagl.GraphViewerGdi.dll, AutomaticGraphLayout.Drawing.dll)

    Quick test =>

    148886-msagl.gif

    3 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Guido Franzke 2,186 Reputation points
    2021-11-12T06:54:17.753+00:00

    Hello,
    have a look at this code:
    cppgraph
    index.html
    Edit: and have a look at this: free-c-library-for-drawing-flow-diagrams-or-directed-graph
    Regards, Guido

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.