#include "wx/resource.h"
#endif
+// To UG: there's no point in putting this #if here
+// if you don't do the same for the Ole calls further down.
+// Also, OLE is used not just for drag and drop (it's used by automatn.cpp).
+// #if wxUSE_DRAG_AND_DROP
+#ifndef __GNUWIN32__
+#include <ole2.h>
+#endif
+// #endif
+
#include <string.h>
#include <ctype.h>
#define _DEBUG
#endif
+ /* Need to undef new if including crtdbg.h */
+ #ifdef new
+ #undef new
+ #endif
+
#include <crtdbg.h>
+
+ #if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS
+ #define new new(__FILE__,__LINE__)
+ #endif
+
#endif
extern char *wxBuffer;
bool wxApp::Initialize()
{
+ // Some people may wish to use this, but
+ // probably it shouldn't be here by default.
+#ifdef __WXDEBUG__
+// wxRedirectIOToConsole();
+#endif
+
wxBuffer = new char[1500];
#ifdef wxUSE_VC_CRTDBG
return FALSE;
}
*/
-
+
+#ifndef __GNUWIN32__
// we need to initialize OLE library
if ( FAILED(::OleInitialize(NULL)) )
wxFatalError(_("Cannot initialize OLE"));
+#endif
#if CTL3D
if (!Ctl3dRegister(wxhInstance))
if ( wxDisableButtonBrush )
::DeleteObject( wxDisableButtonBrush ) ;
+#ifndef __GNUWIN32__
::OleUninitialize();
+#endif
#if CTL3D
Ctl3dUnregister(wxhInstance);
int nCmdShow,
bool enterLoop)
{
-#ifndef __WXDEBUG__ // take everything into a try-except block in release build
+#if !defined(__WXDEBUG__) && !defined(__BORLANDC__) // take everything into a try-except block in release build
try {
#endif
wxApp::CleanUp();
return retValue;
-#ifndef __WXDEBUG__ // catch exceptions only in release build
+#if !defined(__WXDEBUG__) && !defined(__BORLANDC__) // catch exceptions only in release build
}
except ( EXCEPTION_EXECUTE_HANDLER ) {
/*
if (event.MoreRequested())
needMore = TRUE;
- wxNode* node = win->GetChildren()->First();
+ wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();