// ----------------------------------------------------------------------------
#if !defined(__WXMSW__) && !defined(__WXPM__)
- #include "mondrian.xpm"
+ #include "../sample.xpm"
#endif
#if USE_XPM_BITMAPS
#endif
// Give it an icon
- SetIcon(wxICON(mondrian));
+ SetIcon(wxICON(sample));
// Make a menubar
wxMenu *tbarMenu = new wxMenu;
// Associate the menu bar with the frame
SetMenuBar(menuBar);
+ menuBar->Check(IDM_TOOLBAR_TOGGLE_TOOLBAR, true);
menuBar->Check(IDM_TOOLBAR_SHOW_BOTH, true);
menuBar->Check(IDM_TOOLBAR_TOGGLETOOLTIPS, true);
}
else
{
+ // notice that there is no need to call SetToolBar(NULL) here (although
+ // this it is harmless to do and it must be called if you do not delete
+ // the toolbar but keep it for later reuse), just delete the toolbar
+ // directly and it will reset the associated frame toolbar pointer
delete tbar;
-
- SetToolBar(NULL);
}
}
{
if ( m_tbar )
{
- delete m_tbar;
- m_tbar = NULL;
+ wxDELETE(m_tbar);
}
else
{