Add CPlot files

There are three steps to getting CPlot set up to be used in your project.
  1. Copy the source files to your project
  2. Add the source files to your project
  3. Add the resources to your project
Step 1
Copy the following files into your project directory: Step 2
Add these files (the .h and .cpp ones) to your project by choosing the Project --> Add To Project --> Files... menu item. Select all the files in the dialog box that comes up and click OK.

Step 3
Visual Studio does not, in my opinion, have great support for resources. I include resources in CPlot because I think they make things easier, but at the same time, Visual Studio makes it hard to manage multiple resource sets. Hard isn't the word, but perhaps it requires more forethought than I'm used to putting in. =)

Having said that, it isn't all that difficult to add the CPlot resources to your project. choose the View --> Resource Includes ... menu item:

In the area labeled "Compile-time directives", enter the following:

#include "CPlotResources.rc"

(If there is already text in the box, append it to the text, do not replace the text.)

Now the resources have been added to your project. The resources all have very large ID numbers, which should not interfere with the resource IDs in your project. If you feel that this may be the case, feel free to edit "CPlotResources/resource.h" and change the numbers.

Even though the resources have been added to your project, you will not be able to edit them with the resource editor because they will not show up in the list. You need to add the resource file manually. Again, choose Project --> Add To Project --> Files..., change the type to resource files, and select the file "CPlotResources/CPlotResources.rc". Visual Studio will tell you that only one resource file can be active at a time. This is OK. But now the CPlot resources should show up as a separate folder in the resources tab.

Because of the way Visual Studio does things, you will want to do a full rebuild the next time you build your project after adding these resources.


Tutorial:


CPlot Reference