Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Grid User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

4.3 Miscellaneous Tips

4.3.1 Using Pre-Built Libraries

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.

4.3.2 Checklist for Build Configurations

Table 3: Build Configurations

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.

4.3.2.1 Miscellaneous Configurations

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.

4.3.3 Objective Grid and VC++

4.3.3.1 Building and Using VC++ Libraries

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.

4.3.3.2 Make Files and Building Directly with nmake

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.

4.3.3.3 Known Issues in VC++ Unicode Libraries

4.3.3.4 Objective Grid AppWizard

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.

4.3.3.5 Objective Grid Designer Utility

The source for the Objective Grid Designer Utility is available under the StingrayInstallation\utils directory, and can be compiled with any of the supported compiler versions.

4.3.3.6 Setting Paths in Visual Studio

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.

4.3.4 Objective Grid and Windows Look and Feel

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.

4.3.4.1 Vista Look and Feel

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:

The following styles are available through this call:

4.3.4.2 XP Look and Feel

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

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."



Previous fileTop of DocumentContentsNo linkNext file

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.