}
// Reading and writing resources (eg WIN.INI, .Xdefaults)
-#if USE_RESOURCES
+#if wxUSE_RESOURCES
bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file)
{
// TODO
}
else return FALSE;
}
-#endif // USE_RESOURCES
+#endif // wxUSE_RESOURCES
static int wxBusyCursorCount = 0;
if (gs_currentDisplay)
return gs_currentDisplay;
- return XtDisplay ((Widget) wxTheApp->GetTopLevelWidget());
+ if (wxTheApp && wxTheApp->GetTopLevelWidget())
+ return XtDisplay ((Widget) wxTheApp->GetTopLevelWidget());
+ else if (wxTheApp)
+ return wxTheApp->GetInitialDisplay();
+ else
+ return (WXDisplay*) NULL;
}
bool wxSetDisplay(const wxString& display_name)