void wxFrameBase::DeleteAllBars()
{
#if wxUSE_MENUS
- if ( m_frameMenuBar )
- {
- delete m_frameMenuBar;
- m_frameMenuBar = NULL;
- }
+ wxDELETE(m_frameMenuBar);
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
- if ( m_frameStatusBar )
- {
- delete m_frameStatusBar;
- m_frameStatusBar = NULL;
- }
+ wxDELETE(m_frameStatusBar);
#endif // wxUSE_STATUSBAR
#if wxUSE_TOOLBAR
- if ( m_frameToolBar )
- {
- delete m_frameToolBar;
- m_frameToolBar = NULL;
- }
+ wxDELETE(m_frameToolBar);
#endif // wxUSE_TOOLBAR
}
{
#if wxUSE_MENUS
// if no help string found, we will clear the status bar text
+ //
+ // NB: wxID_NONE is used for (sub)menus themselves by wxMSW
wxString helpString;
- if ( menuId != wxID_SEPARATOR && menuId != -3 /* wxID_TITLE */ )
+ if ( menuId != wxID_SEPARATOR && menuId != wxID_NONE )
{
const wxMenuItem * const item = FindItemInMenuBar(menuId);
if ( item && !item->IsSeparator() )