Added wxPGInitResourceModule(), needed for proper initialization in wxPython bindings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-05-29 18:17:40 +00:00
parent f94693fbc4
commit d90ce88c33
2 changed files with 13 additions and 0 deletions

View File

@@ -102,6 +102,10 @@ extern WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass* wxPGGlobalVars;
#define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False)
// When wxPG is loaded dynamically after the application is already running
// then the built-in module system won't pick this one up. Add it manually.
WXDLLIMPEXP_PROPGRID void wxPGInitResourceModule();
#endif // !SWIG
// -----------------------------------------------------------------------

View File

@@ -154,6 +154,15 @@ public:
IMPLEMENT_DYNAMIC_CLASS(wxPGGlobalVarsClassManager, wxModule)
// When wxPG is loaded dynamically after the application is already running
// then the built-in module system won't pick this one up. Add it manually.
void wxPGInitResourceModule()
{
wxModule* module = new wxPGGlobalVarsClassManager;
module->Init();
wxModule::RegisterModule(module);
}
wxPGGlobalVarsClass* wxPGGlobalVars = NULL;