// we're using TCP/IP or real DDE.
#include "ipcsetup.h"
-#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
-#include "mondrian.xpm"
-#endif
-
#include "wx/datetime.h"
#include "client.h"
+#ifndef wxHAS_IMAGES_IN_RESOURCES
+ #include "../sample.xpm"
+#endif
+
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
: wxFrame(frame, wxID_ANY, title, wxDefaultPosition, wxSize(400, 300))
{
// Give it an icon
- SetIcon(wxICON(mondrian));
+ SetIcon(wxICON(sample));
// Make a menubar
wxMenu *file_menu = new wxMenu;
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"));
}