// ----------------------------------------------------------------------------
// the (popup) menu title has this special id
-static const int idMenuTitle = -2;
+static const int idMenuTitle = -3;
// ----------------------------------------------------------------------------
// private functions
if ( IsAttached() )
{
- m_menuBar->RebuildAccelTable();
+ GetMenuBar()->RebuildAccelTable();
}
}
//else: it is a separator, they can't have accels, nothing to do
#endif // __WIN32__
// if we're already attached to the menubar, we must update it
- if ( IsAttached() && m_menuBar->IsAttached() )
+ if ( IsAttached() && GetMenuBar()->IsAttached() )
{
- m_menuBar->Refresh();
+ GetMenuBar()->Refresh();
}
return TRUE;
wxLogLastError(wxT("RemoveMenu"));
}
- if ( IsAttached() && m_menuBar->IsAttached() )
+ if ( IsAttached() && GetMenuBar()->IsAttached() )
{
// otherwise, the chane won't be visible
- m_menuBar->Refresh();
+ GetMenuBar()->Refresh();
}
// and from internal data structures
{
if ( m_invokingWindow != NULL )
return m_invokingWindow;
- else if ( m_menuBar != NULL)
- return m_menuBar->GetFrame();
+ else if ( GetMenuBar() != NULL)
+ return GetMenuBar()->GetFrame();
return NULL;
}
wxASSERT(menu);
wxASSERT(menu->GetHMenu());
wxASSERT(m_hMenu);
+
+#if defined(__WXWINCE__)
+ int totalMSWItems = GetMenuCount();
+#else
int totalMSWItems = GetMenuItemCount((HMENU)m_hMenu);
+#endif
+
int i; // For old C++ compatibility
for(i=wxpos; i<totalMSWItems; i++)
{