-1->wxID_ANY, TRUE->true and FALSE->false replacements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -132,11 +132,11 @@ bool MyApp::OnInit()
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
// Show it and tell the application that it's our main window
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
SetTopWindow(frame);
|
||||
|
||||
// Success
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -145,7 +145,7 @@ bool MyApp::OnInit()
|
||||
|
||||
// frame constructor
|
||||
|
||||
MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, -1,
|
||||
MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY,
|
||||
_("wxSocket demo: Server"),
|
||||
wxDefaultPosition, wxSize(300, 200))
|
||||
{
|
||||
@@ -167,7 +167,7 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, -1,
|
||||
CreateStatusBar(2);
|
||||
|
||||
// Make a textctrl for logging
|
||||
m_text = new wxTextCtrl(this, -1,
|
||||
m_text = new wxTextCtrl(this, wxID_ANY,
|
||||
_("Welcome to wxSocket demo: Server\n"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxTE_READONLY);
|
||||
@@ -193,9 +193,9 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, -1,
|
||||
// Setup the event handler and subscribe to connection events
|
||||
m_server->SetEventHandler(*this, SERVER_ID);
|
||||
m_server->SetNotify(wxSOCKET_CONNECTION_FLAG);
|
||||
m_server->Notify(TRUE);
|
||||
m_server->Notify(true);
|
||||
|
||||
m_busy = FALSE;
|
||||
m_busy = false;
|
||||
m_numClients = 0;
|
||||
UpdateStatusBar();
|
||||
}
|
||||
@@ -210,8 +210,8 @@ MyFrame::~MyFrame()
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
Close(TRUE);
|
||||
// true is to force the frame to close
|
||||
Close(true);
|
||||
}
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -320,11 +320,11 @@ void MyFrame::OnServerEvent(wxSocketEvent& event)
|
||||
m_text->AppendText(s);
|
||||
|
||||
// Accept new connection if there is one in the pending
|
||||
// connections queue, else exit. We use Accept(FALSE) for
|
||||
// connections queue, else exit. We use Accept(false) for
|
||||
// non-blocking accept (although if we got here, there
|
||||
// should ALWAYS be a pending connection).
|
||||
|
||||
sock = m_server->Accept(FALSE);
|
||||
sock = m_server->Accept(false);
|
||||
|
||||
if (sock)
|
||||
{
|
||||
@@ -338,7 +338,7 @@ void MyFrame::OnServerEvent(wxSocketEvent& event)
|
||||
|
||||
sock->SetEventHandler(*this, SOCKET_ID);
|
||||
sock->SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG);
|
||||
sock->Notify(TRUE);
|
||||
sock->Notify(true);
|
||||
|
||||
m_numClients++;
|
||||
UpdateStatusBar();
|
||||
|
Reference in New Issue
Block a user