Stingray Studio : Objective Grid User’s Guide : PART II Programmer’s Guide : Chapter 27 GridEx Feature Pack Extension
Chapter 27 GridEx Feature Pack Extension
Overview
The Objective GridEx Extension Library extends Objective Grid to provide Feature Pack functionality to the Objective Grid binaries. This extension library is built as a separate binary that works in conjunction with your Objective Grid application, so there is no need to rebuild the Objective Grid libraries.
This design allows you to:
*Easily add or extend new Feature Pack functionality to existing Objective Grid applications.
*Simply compile and link the Objective GridEx library to existing Objective Grid applications.
*Quickly gain Feature Pack functionality with little to no modifications to existing applications.
*Easily extend your own functionality.
*Additionally link the extended Stingray Foundation Library (SFLEx) which may be used to extend your Grid application's frames, windows controls, etc. to take advantage of the Feature Pack.
This chapter illustrates how to extend your Grid application to add GridEx features.
Architecture
The library is based on MFC classes introduced with the MFC Feature Pack in Microsoft Visual Studio 2008 SP1. Objective GridEx is built as an extension of, and is tightly coupled with, the Objective Grid MFC extended libraries. The approach used is described in “Sharing Extended Functionality Across Classes” which uses template classes derived from CGXGridCore. All code in Objective GridEx is unmanaged. Further, all code uses the namespace ogex to avoid collisions.
Objective GridEx contains the following functionality in the following header files:
Table 32 – GridEx Header Files
Headers
Description
GridEx\ExcelSelection\GXGridCoreEx.h
Template class for extended Excel functionality
GridEx\ExcelHeaders\GXHeaderExcel.h
CGXExcelHeader class derived from CGXHeader
GridEx\ColorButton\GXColorButton.h
CGXColorButton derived from CMFCColorButton & CGXPushbutton
GridEx\PopUpMenuEdit\PopUpMenuEdit.h
CPopUpMenuEdit class derived from CGXEditControl
GridEx\ToolTips\gxttnex.h
CGXToolTipCtrl class derived from CMFCToolTipCtrl
GridEx\ToolTips\GXGridToolTipsEx.h
Template class to implement, enable and set Tool Tips
GridEx Features
Objective GridEx provides support for:
1. Feature pack style tool tips supporting multiline text and icons
2. Feature pack color buttons embedded in a cell
3. Alpha-blending Excel-looking selections
4. Context menus in active and inactive grid cells
5. Excel-like headers supporting styling (Blue, Silver and Black Office styles)
In addition, Objective Grid itself includes another feature related to GridEx:
*Use of Objective Grid as a pseudo-3D color chart
System Requirements
The GridEx features work with all currently supported platforms. Please review the Supported Platforms document for the current list of supported compilers per release.
Code Source and Sample Locations
 
Source Locations
The GridEx Feature Pack extension product file locations are:
Include files:
<Install_dir>\Include\GridEx // header files
Resources:
<Install_dir>\Include\Res // resource files
Libraries:
<Install_dir>\Lib\vc9\x86 // Win32 binary files
<Install_dir>\Lib\vc9\x64 // 64-bit binary files
Source files:
<Install_dir>\Src // *.sln/*.vcproj and \obj subdir
<Install_dir>\Src\GridEx // implementation files
NOTE >> Note: Shipped examples that demonstrate the Color Button and Context Menu features use GridEx resources. To dynamically link the GridEx library, add the macro _OGEXDLL to the Preprocessor Definitions. If a dynamic link is not set, you must add the includes OGResEx.h and OGResEx.rc.
Sample Locations
Two sets of samples ship that illustrate the new features:
*GridEx sample, <Install_dir>\Samples\GridEx
*Objective Grid 13.0.1 sample, illustrating Print/Print Preview, <Install_dir>\Samples\Grid\Print Preview
NOTE >> Note: Build the Objective Grid libraries before building the GridEx library and the new samples. For the ExcelGrid sample, you must also build the FoundationEx library.