// Author: Julian Smart
// Modified by: Jurgen Doornik
// Created: 25/01/99
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/datetime.h"
#include "client.h"
-#if !defined(__WXMSW__) && !defined(__WXPM__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
void MyFrame::OnClose(wxCloseEvent& event)
{
- if (m_client)
- {
- delete m_client;
- m_client = NULL;
- }
+ wxDELETE(m_client);
+
event.Skip();
}
if (!retval)
{
- delete m_client;
- m_client = NULL;
+ wxDELETE(m_client);
}
EnableControls();
}
void MyFrame::Disconnect()
{
- delete m_client;
- m_client = NULL;
+ wxDELETE(m_client);
EnableControls();
}
if (m_connection)
{
m_connection->Disconnect();
- delete m_connection;
- m_connection = NULL;
+ wxDELETE(m_connection);
wxGetApp().GetFrame()->EnableControls();
wxLogMessage(wxT("Client disconnected from server"));
}