View Full Version : Use of GridEx without need for SFLWinAppEx?

11-17-2009, 08:25 AM
I have a MFC based application that is already using MFC9 (Feature Pack) classes...
This application also uses Objective Grid. I would like to use the new improved Header available in GridEX. However, when I change my class from being derived from CGXGridWnd to now be derived from CGXGridWndEx, I get
many compiler errors complaining about:

gxgridcoreex.h(1264) : error C2065: 'SFLWinAppEx' : undeclared identifier

Is there any way to make use of the new grid header (for look and coloring etc.) without having to change the rest of my application to use all the other FoundationEx classes? I only want to use the objective grid.

Thank you!

11-18-2009, 08:38 AM
Yes, it is possible to use GridEx classes without FoundationEx in Grid applications.
Please, do following for an app that uses Feature Pack.
1. In function CGXGridCoreEx<T>::OnRButtonClickedRowCol (file GXGridCoreEx.h), replace SFLWinAppEx* with CWinAppEx* and rebuild GridEx if needed.
2. In contrast with ExcelGrid sample, do not use
• in stdafx.h
#include "FoundationEx\FoundationEx.h"
• in Preprocessor Definitions
• in Resource Includes
#include "FoundationEx\Res\SFLResEx.h"
#include "FoundationEx\Res\SFLResEx.rc"
3. If you want change Grid color scheme when application style is changed, a message should be sent to GridView. In ExcelGrid sample we use message WM_SFLEX_APPSTYLE that is defined in FoundationEx resources.
You can define message in your app’s resources or just use in stdafx.h something like
If you created your app with Feature Pack AppWizard, you can send message from function CMainFrame::OnApplicationLook,
SendMessageToDescendants(WM_SFLEX_APPSTYLE, 0);


12-03-2009, 08:35 AM
Hi Boris...
I was able to get this to work pretty close to what I need. I do however have one more question....

The Excel-Like grid header will color the header a highlight color (orange) similar to Excel when items in the column are selected. Is there a way that I can disable this from happening... and secondly, is there a way to change the color of this highlight? Some cases I want no header highlighting and other cases I want to change the highlight color.


12-04-2009, 06:43 AM
Not sure if there is a better way.... but I ended up modifying CGXHeaderExcel::SetColors()