- // Some people may wish to use this, but
- // probably it shouldn't be here by default.
-#ifdef __WXDEBUG__
- // wxRedirectIOToConsole();
-#endif
-
- wxBuffer = new wxChar[1500]; // FIXME
-
- wxClassInfo::InitializeClasses();
-
-#if wxUSE_RESOURCES
- wxGetResource(wxT("wxWindows"), wxT("OsVersion"), &wxOsVersion);
-#endif
-
-#if wxUSE_THREADS
- wxPendingEventsLocker = new wxCriticalSection;
-#endif
-
- wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
- wxTheColourDatabase->Initialize();
-
- wxInitializeStockLists();
- wxInitializeStockObjects();
-
-#if wxUSE_WX_RESOURCES
- wxInitializeResourceSystem();
-#endif
-
- wxBitmap::InitStandardHandlers();
-
-#if defined(__WIN95__)
- InitCommonControls();
-
-#endif // __WIN95__
-
-#if wxUSE_OLE
-
-#ifdef __WIN16__
- // for OLE, enlarge message queue to be as large as possible
- int iMsg = 96;
- while (!SetMessageQueue(iMsg) && (iMsg -= 8))
- ;
-#endif // Win16
- // we need to initialize OLE library
- if ( FAILED(::OleInitialize(NULL)) )
- wxLogError(_("Cannot initialize OLE"));
-#endif // wxUSE_OLE
-
-#if wxUSE_CTL3D
- if (!Ctl3dRegister(wxhInstance))
- wxLogError(wxT("Cannot register CTL3D"));
-
- Ctl3dAutoSubclass(wxhInstance);
-#endif
-
- g_globalCursor = new wxCursor;
-
- // VZ: these icons are not in wx.rc anyhow (but should they?)!
-#if 0
- wxSTD_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_FRAME"));
- wxSTD_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDIPARENTFRAME"));
- wxSTD_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDICHILDFRAME"));
-
- wxDEFAULT_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_FRAME"));
- wxDEFAULT_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDIPARENTFRAME"));
- wxDEFAULT_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDICHILDFRAME"));
-#endif // 0
-
- RegisterWindowClasses();
-
- // Create the brush for disabling bitmap buttons
-
- LOGBRUSH lb;
- lb.lbStyle = BS_PATTERN;
- lb.lbHatch = (int)LoadBitmap( wxhInstance, wxT("wxDISABLE_BUTTON_BITMAP") );
- if ( lb.lbHatch )