X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b62ca03d6f409732ca63c68a79b7ae81444222e5..c687b303a5040da07009ea93504121aeec56682a:/samples/sockets/server.cpp?ds=sidebyside diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index b90dc2643c..548ad955b6 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -18,8 +18,8 @@ // -------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) -# pragma implementation "server.cpp" -# pragma interface "server.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -96,11 +96,11 @@ private: enum { // menu items - SERVER_QUIT = 1000, - SERVER_ABOUT, + SERVER_QUIT = wxID_EXIT, + SERVER_ABOUT = wxID_ABOUT, // id for sockets - SERVER_ID, + SERVER_ID = 100, SOCKET_ID }; @@ -163,8 +163,10 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY, m_menuBar->Append(m_menuFile, _("&File")); SetMenuBar(m_menuBar); +#if wxUSE_STATUSBAR // Status bar CreateStatusBar(2); +#endif // wxUSE_STATUSBAR // Make a textctrl for logging m_text = new wxTextCtrl(this, wxID_ANY, @@ -412,7 +414,9 @@ void MyFrame::OnSocketEvent(wxSocketEvent& event) void MyFrame::UpdateStatusBar() { +#if wxUSE_STATUSBAR wxString s; s.Printf(_("%d clients connected"), m_numClients); SetStatusText(s, 1); +#endif // wxUSE_STATUSBAR }