Objective Chart : PART I User’s Guide : Chapter 2 Basic Concepts : Incorporating Objective Chart into Your Application
Incorporating Objective Chart into Your Application
Once the libraries are built, you are ready to start using Objective Chart classes in your own applications. To add Objective Chart to an existing application:
1. Load your project into Visual Studio.
2. Add required header files.
At the end of your Stdafx.h header file, add:
#include “chart\OChart.h”
Because Stdafx.h is normally included in all your source files, this change makes the Objective Chart classes available throughout your project.
Add other header files that are common to all Stingray Studio products:
Add #include <SupportedPlatforms.h> toward the top of the application's stdafx.h file, to display conditional platform information in the application's output window. This information is helpful when developing and deploying across one or more platforms.
Add #include <ManifestDefs.h> below other #include statements. This file facilitates the inclusion of manifest definitions for Windows Visual Styles.
3. Open the View|Resource Includes dialog and add this line to the end of the list of Compile-time directives:
#include “chart\SRGres.rc”
4. If support for the Chart Wizard is desired, add:
#include “chart\Wizres.rc”
5. Add a combination of _DEBUG, _UNICODE, _AFXDLL, and _OBJCHART_DLL to the Preprocessor Definitions edit box on the Project Settings|C/C++ tab. (Note: _AFXDLL and _DEBUG may be automatically defined by other project settings). This change automatically causes the correct variant of the Objective Chart library to be included in your project.
6. For Visual Studio 2010 or later, please refer to “Stingray Studio Paths in Property Sheets” in the Getting Started part to add property sheet(s) with Stingray Studio paths to the project.
7. Start using Objective Chart.
Chapter 4, “Fast Start With Objective Chart,” describes these steps in more detail.
When creating a new project, the Objective Chart App Wizard can perform these steps (and much more) for you. See Chapter 14 for more information.
Linking to the Objective Chart Library as a DLL
Add the symbol _OBJCHART_DLL in the Preprocessor Definitions edit box on the Project Settings | C/C++ tab.
Including Unicode Support
1. Select one or more of the Unicode configurations when you build the Objective Chart libraries.
2. Select "Use Unicode Character Set" for your build configuration on the project's Property Pages, Configuration Properties\General\Character Set.