X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2f747d8f9f2c4fed617e5ff22a719bfd45259f8..b303fca71405a00abc2a136adf3b7c7c42bc9ea9:/samples/sockets/client.cpp?ds=sidebyside diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index fe33b6bd89..342be4e3cf 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -39,7 +39,9 @@ // -------------------------------------------------------------------------- // the application icon -#include "mondrian.xpm" +#if !defined(__WXMSW__) && !defined(__WXPM__) + #include "../sample.xpm" +#endif // -------------------------------------------------------------------------- // classes @@ -188,9 +190,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; @@ -206,11 +207,11 @@ 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(); - m_menuFile->Append(CLIENT_ABOUT, _("&About...\tCtrl-A"), _("Show about dialog")); + m_menuFile->Append(CLIENT_ABOUT, _("&About\tCtrl-A"), _("Show about dialog")); m_menuFile->AppendSeparator(); m_menuFile->Append(CLIENT_QUIT, _("E&xit\tAlt-X"), _("Quit client")); @@ -618,7 +619,9 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event)) // Get the data wxStringOutputStream sout; if ( data->Read(sout).GetLastError() != wxSTREAM_EOF ) + { wxLogError("Error reading the input stream."); + } wxLogMessage("Text retrieved from URL \"%s\" follows:\n%s", urlname, sout.GetString());