You can obtain prebuilt versions of the libraries by request to Rogue Wave technical support. Libraries are available for Windows XP and Vista with the currently supported compilers. We recommend, however, that you build the libraries yourself. The prebuilt libraries are built with a particular instance of Visual Studio and the Windows operating system. Building the libraries yourself ensures that they are compatible with your version of the compiler and the operating system they are built on.
Type | Objective Grid build | MFC build | Compile Time Directives for resources* | Pre-processor definitions |
Application: | ||||
Static | Static | Yes | ||
Static | DLL | Yes | _AFXDLL | |
DLL | DLL | No | _AFXDLL, _GXDLL | |
DLL | Static | Not supported | Not supported | |
Custom Objective Grid Extension DLL: | ||||
Static | DLL | Yes | _AFXEXT | |
DLL | DLL | No | _AFXEXT, _GXEXT | |
Custom Objective Grid regular DLL: | ||||
Static | DLL | Yes | _AFXDLL | |
DLL | DLL | No | _AFXDLL, _GXDLL |
* Include "grid\gxres.rc" in Compile-time directives.
You should always include "grid\gxresrc.h" in Read-only symbols so you can access the grid resources.
Custom macro definitions should be used in custom Objective Grid Extension DLL; these definitions are provided in the file CustExtDefs.h.
Add "_CUSTEXTDLL" to your C++ Preprocessor Definitions. // Add "_AFXDLL" to your C++ Preprocessor Definitions. // Make sure the project Configuration Type is set to "Dynamic Library (.dll)." // Make sure the project Use of MFC is set to "MFC in a Shared Dll." // For Debug, set the Code Generation Runtime Library to /MDd. // For Release, set the Code Generation Runtime Library to /MD. // // Code: // Include this header file in your project. // Add "#define _CUSTEXTEXPORT_IMPL" to the top of stdafx.cpp. |
Application that links to a custom Objective Grid Extension DLL as well as the Objective Grid Extension DLL;
Application that links to a custom Objective Grid Extension DLL as well as the Objective Grid static lib;
Application that links to a custom Objective Grid Regular DLL as well as the Objective Grid Extension DLL;
Application that links to a custom Objective Grid Regular DLL as well as the Objective Grid static lib;
The settings for all the above miscellaneous configurations can be resolved from the settings for the basic three types of configurations.
Take, for example, an application that links to a custom Objective Grid Extension DLL as well as the Objective Grid Extension DLL. Its settings are similar to an application that links to an Objective Grid Extension DLL: it should include _GXDLL in its preprocessor settings and should not include the resources in its compile time directives.
The solution files required for building OG and the samples under all supported versions of VC++ are included in the appropriate directories as Grid<ver>.sln, where <ver> represents the VC++ version. After rebuilding the libraries, the applications linking to those libraries should also be recompiled in order for them to link and work properly.
When you build the Stingray libraries in Visual Studio, Visual Studio invokes make files that ship with the product. For information on these underlying make files, and how to build the libraries by invoking nmake on these files directly, see Section 2.3, "Building from the Command Line with nmake," in the Stingray Studio Getting Started Guide.
This section also discusses the issue of building the libraries with 1-byte structure alignment rather than the default 8-byte structure alignment.
Unicode Libraries return read-only recordsets in database applications using ODBC if the default snapshot option is used to open the recordset.
The CRecordset class in VC++ does not return writable recordsets in Unicode. Because of this, even though ODBC grid libraries under Unicode display recordsets properly, the recordsets cannot be updated. When trying to update grids such as these, the following error may be displayed: "Error: Invalid Option/identifier".
As a workaround, CRecordset::dynaset or CRecordset::dynamic options should be used to open recordsets.
Unicode is not supported in this version of the Excel read\write classes, so the option ExcelReadWrite must be unchecked in the Grid BuildWizard to allow building Grid libraries with Unicode.
All of the OG AppWizards under VC++ change the default charset to Unicode. The MFC Application Wizard under VC++ by default includes the manifest file that points the application to link to comctrl32.dll.
The source for the Objective Grid Designer Utility is available under the
If you are using Visual Studio 2005 or 2008, check the Visual Studio VC++ Directories for both the Win32 and x64 settings to ensure that the Include, Source, Library and Executable paths contain the appropriate Stingray Studio paths. Refer to Section 2.7.3, "Check Visual Studio Paths," in the Stingray Studio Getting Started Guide for pathing details.
If you are using Visual Studio 2010, you have to set paths in each project. Please refer to Section 2.7.4, "Microsoft Visual Studio 2010 Changes," in the Stingray Studio Getting Started Guide for information on how to add property sheet(s) with Stingray Studio paths.
Objective Grid can take advantage of a number of Windows visual styles, including Windows Vista, Windows XP, Office 2003, and Windows Classic. The next section describes a general mechanism for enabling these styles.
The Vista Classic style feature allows your applications to take on a look and fill similar to Windows Vista Classic. This visual style is theme-enabled, and requires Windows Vista. The style applies to MFC-derived and Stingray custom controls.
Applications and samples enable a particular drawing style with the function call RWSetVisualStyle(). Using this function requires inclusion of the header file RWUXTheme.h, which is found in the <stingray-installdir>\RWUXTheme\Include directory. RWSetVisualStyle() should be placed in the application or sample's main InitInstance() or InitDialog() function call. The call should look like this:
RWSetVisualStyle(RW_VISUALSTYLE_VISTACLASSIC); |
The following styles are available through this call:
RW_VISUALSTYLE_VISTACLASSIC.
RW_VISUALSTYLE_DOTNET
RW_VISUALSTYLE_OFFICE2003
RW_VISUALSTYLE_WINDOWSCLASSIC
On Windows XP, Objective Grid can take advantage of XP visual styles. All the samples in Objective Grid are by default visual styles-enabled. The visual style applied to controls depends on the Windows theme enabled in the system. You can use the same mechanism described in the previous section to enable the XP look and feel.
If the visual styles feature must be turned off (although the manifest file is still included as a resource), call
RWSetVisualStyle( RW_VISUALSTYLE_WINDOWSCLASSIC );RWSetThemeAppProperties(4); |
in the InitInstance() of the application. This will ensure that the theme (even though active) is not applied to the application in question.
For details on how Objective Grid behaves differently under Windows XP, see Section 13.7, "Objective Grid and Windows XP Visual Styles."
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.