git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27479
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
m_currentlyHighlighted->Draw(dc);
}
{
m_currentlyHighlighted->Draw(dc);
}
- m_draggedShape->SetShow(TRUE);
+ m_draggedShape->SetShow(true);
m_draggedShape->Draw(dc);
m_currentlyHighlighted = (DragShape*) NULL;
m_draggedShape->Draw(dc);
m_currentlyHighlighted = (DragShape*) NULL;
delete m_dragImage;
// Erase the dragged shape from the canvas
delete m_dragImage;
// Erase the dragged shape from the canvas
- m_draggedShape->SetShow(FALSE);
+ m_draggedShape->SetShow(false);
wxClientDC dc(this);
EraseShape(m_draggedShape, dc);
DrawShapes(dc);
wxClientDC dc(this);
EraseShape(m_draggedShape, dc);
DrawShapes(dc);
// We're currently dragging. See if we're over another shape.
DragShape* onShape = FindShape(event.GetPosition());
// We're currently dragging. See if we're over another shape.
DragShape* onShape = FindShape(event.GetPosition());
- bool mustUnhighlightOld = FALSE;
- bool mustHighlightNew = FALSE;
+ bool mustUnhighlightOld = false;
+ bool mustHighlightNew = false;
if (m_currentlyHighlighted)
{
if ((onShape == (DragShape*) NULL) || (m_currentlyHighlighted != onShape))
if (m_currentlyHighlighted)
{
if ((onShape == (DragShape*) NULL) || (m_currentlyHighlighted != onShape))
- mustUnhighlightOld = TRUE;
+ mustUnhighlightOld = true;
}
if (onShape && (onShape != m_currentlyHighlighted) && onShape->IsShown())
}
if (onShape && (onShape != m_currentlyHighlighted) && onShape->IsShown())
- mustHighlightNew = TRUE;
+ mustHighlightNew = true;
if (mustUnhighlightOld || mustHighlightNew)
m_dragImage->Hide();
if (mustUnhighlightOld || mustHighlightNew)
m_dragImage->Hide();
END_EVENT_TABLE()
MyFrame::MyFrame()
END_EVENT_TABLE()
MyFrame::MyFrame()
-: wxFrame( (wxFrame *)NULL, -1, _T("wxDragImage sample"),
+: wxFrame( (wxFrame *)NULL, wxID_ANY, _T("wxDragImage sample"),
wxPoint(20,20), wxSize(470,360) )
{
wxMenu *file_menu = new wxMenu();
file_menu->Append( wxID_ABOUT, _T("&About..."));
wxPoint(20,20), wxSize(470,360) )
{
wxMenu *file_menu = new wxMenu();
file_menu->Append( wxID_ABOUT, _T("&About..."));
- file_menu->Append( TEST_USE_SCREEN, _T("&Use whole screen for dragging"), _T("Use whole screen"), TRUE);
+ file_menu->Append( TEST_USE_SCREEN, _T("&Use whole screen for dragging"), _T("Use whole screen"), true);
file_menu->Append( wxID_EXIT, _T("E&xit"));
wxMenuBar *menu_bar = new wxMenuBar();
file_menu->Append( wxID_EXIT, _T("E&xit"));
wxMenuBar *menu_bar = new wxMenuBar();
int widths[] = { -1, 100 };
SetStatusWidths( 2, widths );
int widths[] = { -1, 100 };
SetStatusWidths( 2, widths );
- m_canvas = new MyCanvas( this, -1, wxPoint(0,0), wxSize(10,10) );
+ m_canvas = new MyCanvas( this, wxID_ANY, wxPoint(0,0), wxSize(10,10) );
}
void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )
{
}
void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )
{
}
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
}
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
MyApp::MyApp()
{
// Drag across whole screen
MyApp::MyApp()
{
// Drag across whole screen
m_background = bitmap;
#endif
m_background = bitmap;
#endif
for (j = rect.y; j < rect.y + rect.height; j+= h)
dc.DrawBitmap(bitmap, i, j);
}
for (j = rect.y; j < rect.y + rect.height; j+= h)
dc.DrawBitmap(bitmap, i, j);
}
}
void MyApp::OnUseScreen(wxCommandEvent& WXUNUSED(event))
}
void MyApp::OnUseScreen(wxCommandEvent& WXUNUSED(event))
m_pos.x = 0;
m_pos.y = 0;
m_dragMethod = SHAPE_DRAG_BITMAP;
m_pos.x = 0;
m_pos.y = 0;
m_dragMethod = SHAPE_DRAG_BITMAP;
}
DragShape::~DragShape()
}
DragShape::~DragShape()
memDC.SelectObject(m_bitmap);
dc.Blit(m_pos.x, m_pos.y, m_bitmap.GetWidth(), m_bitmap.GetHeight(),
memDC.SelectObject(m_bitmap);
dc.Blit(m_pos.x, m_pos.y, m_bitmap.GetWidth(), m_bitmap.GetHeight(),
- & memDC, 0, 0, op, TRUE);
+ & memDC, 0, 0, op, true);
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, _T("Dynamic wxWidgets App"), 50, 50, 450, 340);
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, _T("Dynamic wxWidgets App"), 50, 50, 450, 340);
- frame->Connect( DYNAMIC_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED,
+ frame->Connect( DYNAMIC_QUIT, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
&MyFrame::OnQuit );
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
&MyFrame::OnQuit );
- frame->Connect( DYNAMIC_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED,
+ frame->Connect( DYNAMIC_ABOUT, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
&MyFrame::OnAbout );
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
&MyFrame::OnAbout );
frame->SetMenuBar(menu_bar);
// Make a panel with a message
frame->SetMenuBar(menu_bar);
// Make a panel with a message
- wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL);
+ wxPanel *panel = new wxPanel(frame, wxID_ANY, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL);
- (void)new wxStaticText(panel, 311, _T("Hello!"), wxPoint(10, 10), wxSize(-1, -1), 0);
+ (void)new wxStaticText(panel, 311, _T("Hello!"), wxPoint(10, 10), wxDefaultSize, 0);
}
// My frame constructor
MyFrame::MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h):
}
// My frame constructor
MyFrame::MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h):
- wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
+ wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{
{}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
MyFrame *frame = new MyFrame(_T("Erase sample"),
wxPoint(50, 50), wxSize(450, 340));
MyFrame *frame = new MyFrame(_T("Erase sample"),
wxPoint(50, 50), wxSize(450, 340));
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
- : wxFrame((wxFrame *)NULL, -1, title, pos, size)
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
{
SetIcon(wxICON(mondrian));
{
SetIcon(wxICON(mondrian));
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
END_EVENT_TABLE()
MyCanvas::MyCanvas( MyFrame *parent )
END_EVENT_TABLE()
MyCanvas::MyCanvas( MyFrame *parent )
- : wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize,
+ : wxScrolledWindow( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxScrolledWindowStyle |
wxNO_FULL_REPAINT_ON_RESIZE|
wxSUNKEN_BORDER )
wxScrolledWindowStyle |
wxNO_FULL_REPAINT_ON_RESIZE|
wxSUNKEN_BORDER )
m_bitmap = wxBitmap( wxICON(mondrian) );
m_bitmap = wxBitmap( wxICON(mondrian) );
- new wxStaticBitmap( this, -1, m_bitmap, wxPoint(80,20) );
+ new wxStaticBitmap( this, wxID_ANY, m_bitmap, wxPoint(80,20) );
}
void MyCanvas::OnChar( wxKeyEvent &event )
}
void MyCanvas::OnChar( wxKeyEvent &event )
dc.SetBrush( *wxBLACK_BRUSH );
dc.DrawRectangle( 0,0,200,50 );
dc.SetBrush( *wxBLACK_BRUSH );
dc.DrawRectangle( 0,0,200,50 );
- dc.DrawBitmap( m_bitmap, 10, 20, TRUE );
+ dc.DrawBitmap( m_bitmap, 10, 20, true );
dc.SetTextForeground(*wxBLUE);
dc.DrawText(_T("This text is drawn from OnPaint"), 65, 65);
dc.SetTextForeground(*wxBLUE);
dc.DrawText(_T("This text is drawn from OnPaint"), 65, 65);
// it may also be convenient to define an event table macro for this event type
#define EVT_MY_CUSTOM_COMMAND(id, fn) \
DECLARE_EVENT_TABLE_ENTRY( \
// it may also be convenient to define an event table macro for this event type
#define EVT_MY_CUSTOM_COMMAND(id, fn) \
DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_MY_CUSTOM_COMMAND, id, -1, \
+ wxEVT_MY_CUSTOM_COMMAND, id, wxID_ANY, \
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
(wxObject *) NULL \
),
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
(wxObject *) NULL \
),
EVT_UPDATE_UI(Event_Pop, MyFrame::OnUpdateUIPop)
EVT_UPDATE_UI(Event_Pop, MyFrame::OnUpdateUIPop)
- EVT_MY_CUSTOM_COMMAND(-1, MyFrame::OnProcessCustom)
+ EVT_MY_CUSTOM_COMMAND(wxID_ANY, MyFrame::OnProcessCustom)
- //EVT_CUSTOM(wxEVT_MY_CUSTOM_COMMAND, -1, MyFrame::OnProcessCustom)
+ //EVT_CUSTOM(wxEVT_MY_CUSTOM_COMMAND, wxID_ANY, MyFrame::OnProcessCustom)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
// success: wxApp::OnRun() will be called which will enter the main message
// success: wxApp::OnRun() will be called which will enter the main message
- // loop and the application will run. If we returned FALSE here, the
+ // loop and the application will run. If we returned false here, the
// application would exit immediately.
// application would exit immediately.
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
- : wxFrame((wxFrame *)NULL, -1, title, pos, size)
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
{
// init members
m_nPush = 0;
{
// init members
m_nPush = 0;
wxMenu *menuEvent = new wxMenu;
menuEvent->Append(Event_Connect, _T("&Connect\tCtrl-C"),
_T("Connect or disconnect the dynamic event handler"),
wxMenu *menuEvent = new wxMenu;
menuEvent->Append(Event_Connect, _T("&Connect\tCtrl-C"),
_T("Connect or disconnect the dynamic event handler"),
menuEvent->Append(Event_Dynamic, _T("&Dynamic event\tCtrl-D"),
_T("Dynamic event sample - only works after Connect"));
menuEvent->AppendSeparator();
menuEvent->Append(Event_Dynamic, _T("&Dynamic event\tCtrl-D"),
_T("Dynamic event sample - only works after Connect"));
menuEvent->AppendSeparator();
// crashes!
while ( m_nPush-- != 0 )
{
// crashes!
while ( m_nPush-- != 0 )
{
- PopEventHandler(TRUE /* delete handler */);
+ PopEventHandler(true /* delete handler */);
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
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))
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
if ( event.IsChecked() )
{
// disconnect
if ( event.IsChecked() )
{
// disconnect
- Connect(Event_Dynamic, -1, wxEVT_COMMAND_MENU_SELECTED,
+ Connect(Event_Dynamic, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction)
(wxEventFunction)
(wxCommandEventFunction)&MyFrame::OnDynamic);
(wxObjectEventFunction)
(wxEventFunction)
(wxCommandEventFunction)&MyFrame::OnDynamic);
- Disconnect(Event_Dynamic, -1, wxEVT_COMMAND_MENU_SELECTED);
+ Disconnect(Event_Dynamic, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED);
SetStatusText(_T("You can no more use \"Dynamic\" item in the menu"));
SetStatusText(_T("Dynamic: off"), Status_Dynamic);
SetStatusText(_T("You can no more use \"Dynamic\" item in the menu"));
SetStatusText(_T("Dynamic: off"), Status_Dynamic);
{
wxCHECK_RET( m_nPush, _T("this command should be disabled!") );
{
wxCHECK_RET( m_nPush, _T("this command should be disabled!") );
- PopEventHandler(TRUE /* delete handler */);
+ PopEventHandler(true /* delete handler */);
m_nPush--;
SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
m_nPush--;
SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
EVT_IDLE(MyFrame::OnIdle)
EVT_IDLE(MyFrame::OnIdle)
- EVT_TIMER(-1, MyFrame::OnTimer)
+ EVT_TIMER(wxID_ANY, MyFrame::OnTimer)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyPipeFrame, wxFrame)
EVT_BUTTON(Exec_Btn_Send, MyPipeFrame::OnBtnSend)
EVT_BUTTON(Exec_Btn_Get, MyPipeFrame::OnBtnGet)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyPipeFrame, wxFrame)
EVT_BUTTON(Exec_Btn_Send, MyPipeFrame::OnBtnSend)
EVT_BUTTON(Exec_Btn_Get, MyPipeFrame::OnBtnGet)
- EVT_TEXT_ENTER(-1, MyPipeFrame::OnTextEnter)
+ EVT_TEXT_ENTER(wxID_ANY, MyPipeFrame::OnTextEnter)
EVT_CLOSE(MyPipeFrame::OnClose)
EVT_CLOSE(MyPipeFrame::OnClose)
- EVT_END_PROCESS(-1, MyPipeFrame::OnProcessTerm)
+ EVT_END_PROCESS(wxID_ANY, MyPipeFrame::OnProcessTerm)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWidgets to create
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWidgets to create
wxDefaultPosition, wxSize(500, 140));
// Show it and tell the application that it's our main window
wxDefaultPosition, wxSize(500, 140));
// Show it and tell the application that it's our main window
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
- // loop and the application will run. If we returned FALSE here, the
+ // loop and the application will run. If we returned false here, the
// application would exit immediately.
// application would exit immediately.
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
- : wxFrame((wxFrame *)NULL, -1, title, pos, size),
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size),
m_timerIdleWakeUp(this)
{
m_pidLast = 0;
m_timerIdleWakeUp(this)
{
m_pidLast = 0;
SetMenuBar(menuBar);
// create the listbox in which we will show misc messages as they come
SetMenuBar(menuBar);
// create the listbox in which we will show misc messages as they come
- m_lbox = new wxListBox(this, -1);
+ m_lbox = new wxListBox(this, wxID_ANY);
wxFont font(12, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL);
if ( font.Ok() )
wxFont font(12, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL);
if ( font.Ok() )
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
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::OnClear(wxCommandEvent& WXUNUSED(event))
}
void MyFrame::OnClear(wxCommandEvent& WXUNUSED(event))
wxYES_NO | wxCANCEL | wxICON_QUESTION, this) )
{
case wxYES:
wxYES_NO | wxCANCEL | wxICON_QUESTION, this) )
{
case wxYES:
wxString server = wxGetTextFromUser(_T("Server to connect to:"),
DIALOG_TITLE, m_server);
if ( !server )
wxString server = wxGetTextFromUser(_T("Server to connect to:"),
DIALOG_TITLE, m_server);
if ( !server )
m_server = server;
wxString topic = wxGetTextFromUser(_T("DDE topic:"), DIALOG_TITLE, m_topic);
if ( !topic )
m_server = server;
wxString topic = wxGetTextFromUser(_T("DDE topic:"), DIALOG_TITLE, m_topic);
if ( !topic )
m_topic = topic;
wxString cmd = wxGetTextFromUser(_T("DDE command:"), DIALOG_TITLE, m_cmdDde);
if ( !cmd )
m_topic = topic;
wxString cmd = wxGetTextFromUser(_T("DDE command:"), DIALOG_TITLE, m_cmdDde);
if ( !cmd )
}
void MyFrame::OnDDEExec(wxCommandEvent& WXUNUSED(event))
}
void MyFrame::OnDDEExec(wxCommandEvent& WXUNUSED(event))
bool MyPipedProcess::HasInput()
{
bool MyPipedProcess::HasInput()
{
if ( IsInputAvailable() )
{
if ( IsInputAvailable() )
{
m_parent->GetLogListBox()->Append(msg);
m_parent->GetLogListBox()->Append(msg);
}
if ( IsErrorAvailable() )
}
if ( IsErrorAvailable() )
m_parent->GetLogListBox()->Append(msg);
m_parent->GetLogListBox()->Append(msg);
m_input.clear();
// call us once again - may be we'll have output
m_input.clear();
// call us once again - may be we'll have output
}
return MyPipedProcess::HasInput();
}
return MyPipedProcess::HasInput();
MyPipeFrame::MyPipeFrame(wxFrame *parent,
const wxString& cmd,
wxProcess *process)
MyPipeFrame::MyPipeFrame(wxFrame *parent,
const wxString& cmd,
wxProcess *process)
- : wxFrame(parent, -1, cmd),
+ : wxFrame(parent, wxID_ANY, cmd),
m_process(process),
// in a real program we'd check that the streams are !NULL here
m_in(*process->GetInputStream()),
m_process(process),
// in a real program we'd check that the streams are !NULL here
m_in(*process->GetInputStream()),
{
m_process->SetNextHandler(this);
{
m_process->SetNextHandler(this);
- wxPanel *panel = new wxPanel(this, -1);
+ wxPanel *panel = new wxPanel(this, wxID_ANY);
- m_textIn = new wxTextCtrl(panel, -1, _T(""),
+ m_textIn = new wxTextCtrl(panel, wxID_ANY, _T(""),
wxDefaultPosition, wxDefaultSize,
wxTE_PROCESS_ENTER);
wxDefaultPosition, wxDefaultSize,
wxTE_PROCESS_ENTER);
- m_textOut = new wxTextCtrl(panel, -1, _T(""));
- m_textOut->SetEditable(FALSE);
+ m_textOut = new wxTextCtrl(panel, wxID_ANY, _T(""));
+ m_textOut->SetEditable(false);
wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
sizerTop->Add(m_textIn, 0, wxGROW | wxALL, 5);
wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
sizerTop->Add(m_textIn, 0, wxGROW | wxALL, 5);
class MyApp : public wxApp
{
public:
class MyApp : public wxApp
{
public:
- virtual bool OnInit() { (new MyFrame())->Show(); return TRUE; }
+ virtual bool OnInit() { (new MyFrame())->Show(); return true; }
};
// ----------------------------------------------------------------------------
};
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame()
// frame constructor
MyFrame::MyFrame()
- : wxFrame(NULL, -1, _T("HtmlLbox wxWidgets Sample"),
+ : wxFrame(NULL, wxID_ANY, _T("HtmlLbox wxWidgets Sample"),
wxDefaultPosition, wxSize(400, 500))
{
// set the frame icon
wxDefaultPosition, wxSize(400, 500))
{
// set the frame icon
// create the child controls
m_hlbox = new MyHtmlListBox(this);
// create the child controls
m_hlbox = new MyHtmlListBox(this);
- wxTextCtrl *text = new wxTextCtrl(this, -1, _T(""),
+ wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, _T(""),
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE);
delete wxLog::SetActiveTarget(new wxLogTextCtrl(text));
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE);
delete wxLog::SetActiveTarget(new wxLogTextCtrl(text));
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
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))
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
// ============================================================================
MyHtmlListBox::MyHtmlListBox(wxWindow *parent, bool multi)
// ============================================================================
MyHtmlListBox::MyHtmlListBox(wxWindow *parent, bool multi)
- : wxHtmlListBox(parent, -1, wxDefaultPosition, wxDefaultSize,
+ : wxHtmlListBox(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
multi ? wxLB_MULTIPLE : 0)
{
m_change = true;
multi ? wxLB_MULTIPLE : 0)
{
m_change = true;