GXInit

void GXInit(CGXAbstractControlFactory* pFactory, LPCTSTR pszLang = NULL, LPCTSTR pszPath = NULL);

void GXInit(LPCTSTR pszLang = NULL, LPCTSTR pszPath = NULL);

pFactory

Points to a CGXAbstractControlFactory-derived object which will be registered as default control factory object. If pFactory is NULL, a CGXControlFactory object will be created and registered. See the description of CGXAbstractControlFactory for information on control factory.

pszLang

An optional language identifier, e.g., “Deu”, “Nld” or “Fra” if you want to load in a language-specific resource DLL (Objective Grid 32-Bit DLL version only).

pszPath

An optional path by which to search for the language DLL. If NULL, the system path will be searched. (Objective Grid 32-Bit DLL version only).

Remarks

You should call this method from your application class InitInstance method. It will initialize resources and variables used by Objective Grid.

In most cases you will call GXInit() without paramters. But, if you want to register your own control factory class, you should call GXInit(new CMyControlFactory);

With the 32-Bit DLL version, it is possible to load the language DLLs that come with OG at run time. To do this, you have to build the language DLLs (e.g., src\l.nld\gx50nld.mak). Next, you have to call GXInit and specify the identifier for the language, e.g., GXInit(_T(“Nld”)).

When an application wants to use a language DLL, it should NOT include GxRes.rc (GxResNld.rc, ...) . If it does, the user will always see the included resources, because MFC always tries to load resources from the app first. If it doesn’t find them there, MFC tries the DLLs.

See Also

 GXInitODBC  GXTerminate

Macros

 Class Overview |  Class Members