Going from easier to harder, the easiest thing for you to do is to export a tab-delimited text file from your C++ application:
1-a. In your C++ application, create a tab-delimited text file in the format "Vertex1Name\tVertex2Name\tEdgeName". The EdgeName field is optional.
1-b. Open your tab-delimited file in Excel, which knows how to open such files.
1-c. Create a NodeXL workbook in Excel (Round Office Button, New, My templates, NodeXLGraph.xltx).
1-d. In the NodeXL workbook, select NodeXL, Data, Import, From Open Edge Workbook in the Excel ribbon. This will let you copy your edge list from the other Excel workbook into the NodeXL workbook.
1-e. In the NodeXL workbook, click Show Graph at the top of the graph pane, which is on the right side of the workbook.
The advantage here is that exporting a tab-delimited text file is trivial, and you don't need the NodeXL class libraries at all. The disadvantage is the multiple steps required in Excel to show your graph. But if you have just a few graphs to
show, this is the way to go.
Alternatively, to eliminate those multiple steps, you can have your C++ application export a GraphML file, which can be directly imported into a NodeXL workbook. GraphML is an industry-standard XML format for storing network graph data. Here
is an introduction:
You don't need the NodeXL class libraries to export a GraphML file. If your C++ application is .NET-based, however, you can use the
GraphMLGraphAdapter class in the libraries to do this. It's documented in the help file.
The steps here are:
2-a. In your C++ application, create a GraphML file containing your edge data.
2-b. Create a NodeXL workbook in Excel (Round Office Button, New, My templates, NodeXLGraph.xltx).
2-c. In the NodeXL workbook, select NodeXL, Data, Import, from GraphML file.
2-d. In the NodeXL workbook, click Show Graph.
Finally, you could skip the NodeXL Excel Template altogether and show a NodeXL graph directly in your application using the NodeXLControl. However, Visual Studio doesn't make it easy to do this in the designer for C++ applications. First,
NodeXLControl is WPF-based, and there is no project template for a C++ WPF application. Second, NodeXLControl can be used in a Windows Forms application by hosting it in an ElementHost control (which is documented in the NodeXLControl Class topic in
the help file), but Visual Studio won't show the ElementHost in its Toolbox in C++ applications. There is nothing in the NodeXLControl that would prevent it from being used in a C++ application, but I don't know how to do it from the designer.
It's easy in C# applications, however. Any chance of your using C# instead of C++?