// headers
// ---------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "menu.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow)
+/*
+ TODO PROPERTIES
+ wxMenu
+ label
+ help
+
+ separator
+ break
+ label
+ accel
+ radio
+ checkable
+ help
+ bitmap
+ wxMenuItem
+*/
+
// ---------------------------------------------------------------------------
// wxMenu construction, adding and removing menu items
// ---------------------------------------------------------------------------
WXHMENU wxMenuBar::Create()
{
+ // Note: this totally doesn't work on Smartphone,
+ // since you have to use resources.
+ // We'll have to find another way to add a menu
+ // by changing/adding menu items to an existing menu.
#ifdef __WXWINCE__
if ( m_hMenu != 0 )
return m_hMenu;
tbButton.dwData = (DWORD)hPopupMenu;
wxString label = wxStripMenuCodes(GetLabelTop(i));
tbButton.iString = (int) label.c_str();
+
+ int position = i;
tbButton.idCommand = NewControlId();
- if (!::SendMessage(hCommandBar, TB_INSERTBUTTON, i, (LPARAM)&tbButton))
+ if (!::SendMessage(hCommandBar, TB_INSERTBUTTON, position, (LPARAM)&tbButton))
{
wxLogLastError(wxT("TB_INSERTBUTTON"));
}