]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/ipc/server.cpp
Added wxSimplebook class: a wxBookCtrl without controller.
[wxWidgets.git] / samples / ipc / server.cpp
index 4bd26352a2b5f14a8cd6f378e0b5fba0764349c0..47b2d62ee6d15680cc576b207af09e84d74269ef 100644 (file)
@@ -32,7 +32,7 @@
 // we're using TCP/IP or real DDE.
 #include "ipcsetup.h"
 
-#if !defined(__WXMSW__) && !defined(__WXPM__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
     #include "../sample.xpm"
 #endif
 
@@ -160,11 +160,7 @@ void MyFrame::UpdateUI()
 
 void MyFrame::OnClose(wxCloseEvent& event)
 {
-    if (m_server)
-    {
-        delete m_server;
-        m_server = NULL;
-    }
+    wxDELETE(m_server);
     event.Skip();
 }
 
@@ -185,8 +181,7 @@ void MyFrame::OnStart(wxCommandEvent& WXUNUSED(event))
     else
     {
         wxLogMessage("Server %s failed to start", servername);
-        delete m_server;
-        m_server = NULL;
+        wxDELETE(m_server);
     }
     UpdateUI();
 }
@@ -262,8 +257,7 @@ void MyServer::Disconnect()
 {
     if ( m_connection )
     {
-        delete m_connection;
-        m_connection = NULL;
+        wxDELETE(m_connection);
         wxGetApp().GetFrame()->UpdateUI();
         wxLogMessage("Disconnected client");
     }