// headers
// --------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(__APPLE__)
- #pragma implementation
- #pragma interface
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// --------------------------------------------------------------------------
// the application icon
-#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
-# include "mondrian.xpm"
-#endif
+#include "mondrian.xpm"
// --------------------------------------------------------------------------
// classes
enum
{
// menu items
- SERVER_QUIT = 1000,
- SERVER_ABOUT,
+ SERVER_QUIT = wxID_EXIT,
+ SERVER_ABOUT = wxID_ABOUT,
// id for sockets
- SERVER_ID,
+ SERVER_ID = 100,
SOCKET_ID
};
bool MyApp::OnInit()
{
+ if ( !wxApp::OnInit() )
+ return false;
+
// Create the main application window
MyFrame *frame = new MyFrame();
wxTE_MULTILINE | wxTE_READONLY);
// Create the address - defaults to localhost:0 initially
+#if wxUSE_IPV6
+ wxIPV6address addr;
+#else
wxIPV4address addr;
+#endif
addr.Service(3000);
// Create the socket