]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/sockets/server.cpp
added wxUniChar::AsUTF8() for easy conversion in UTF8 build
[wxWidgets.git] / samples / sockets / server.cpp
index fab500e48d92043d97b10dac98550b76325810d8..0e2be5b7dce110cb55169c3e68ce799dcaa09c83 100644 (file)
 // headers
 // --------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma implementation
-    #pragma interface
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -96,11 +91,11 @@ private:
 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
 };
 
@@ -128,6 +123,9 @@ IMPLEMENT_APP(MyApp)
 
 bool MyApp::OnInit()
 {
+  if ( !wxApp::OnInit() )
+      return false;
+
   // Create the main application window
   MyFrame *frame = new MyFrame();