#include "mondrian.xpm"
#endif
-#if !WXDEBUG
-#error You must set WXDEBUG to 1 on the 'make' command line (MSW) or with configure (GTK)
+#ifndef __WXDEBUG__
+#error This program must be compiled in debug mode.
#endif
-// #define new WXDEBUG_NEW
-
// Define a new application type
class MyApp: public wxApp
{ public:
MyFrame *frame = new MyFrame((wxFrame *) NULL);
// Give it an icon
-#ifdef wx_msw
+#ifdef __WXMSW__
frame->SetIcon(wxIcon("mondrian"));
+#else
frame->SetIcon(wxIcon(mondrian_xpm));
#endif
frame->Show(TRUE);
wxDebugContext::SetCheckpoint();
- wxDebugContext::SetFile("debug.log");
+// wxDebugContext::SetFile("debug.log");
- wxString *thing = new wxString; // WXDEBUG_NEW wxString;
+ wxString *thing = new wxString;
wxDate* date = new wxDate;
- // Proves that defining 'new' to be 'WXDEBUG_NEW' doesn't mess up
// non-object allocation
char *ordinaryNonObject = new char[1000];
wxDebugContext::Dump();
wxDebugContext::PrintStatistics();
- // Don't delete these two objects, to force wxApp to flag a memory leak.
+ // Don't delete these objects, to force wxApp to flag a memory leak.
// delete thing;
// delete date;
// delete[] ordinaryNonObject;
{}
// Intercept menu commands
-void MyFrame::OnQuit(wxCommandEvent& event)
+void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}