X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b4b6080913e757f6900b9e0912ab9dab91561a6..8a31648287be0ef976f133de2786b137f1e98340:/samples/sockets/server.cpp?ds=sidebyside diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 6dcc04eb23..853fb4b278 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -45,7 +45,9 @@ // -------------------------------------------------------------------------- // the application icon -#include "mondrian.xpm" +#if !defined(__WXMSW__) && !defined(__WXPM__) + #include "../sample.xpm" +#endif // -------------------------------------------------------------------------- // classes @@ -160,9 +162,8 @@ bool MyApp::OnInit() // Create the main application window MyFrame *frame = new MyFrame(); - // Show it and tell the application that it's our main window + // Show it frame->Show(true); - SetTopWindow(frame); // Success return true; @@ -179,7 +180,7 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY, wxDefaultPosition, wxSize(300, 200)) { // Give the frame an icon - SetIcon(wxICON(mondrian)); + SetIcon(wxICON(sample)); // Make menus m_menuFile = new wxMenu(); @@ -216,8 +217,8 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY, // Create the socket m_server = new wxSocketServer(addr); - // We use Ok() here to see if the server is really listening - if (! m_server->Ok()) + // We use IsOk() here to see if the server is really listening + if (! m_server->IsOk()) { wxLogMessage("Could not listen at the specified port !"); return;