+
+ wxMenuItemBase::Enable(enable);
+}
+
+void wxMenuItem::Check(bool check)
+{
+ wxCHECK_RET( m_isCheckable, wxT("only checkable items may be checked") );
+
+ if ( m_isChecked == check )
+ return;
+
+ long rc = CheckMenuItem(GetHMenuOf(m_parentMenu),
+ GetRealId(),
+ MF_BYCOMMAND |
+ (check ? MF_CHECKED : MF_UNCHECKED));
+
+ if ( rc == -1 ) {
+ wxLogLastError(wxT("CheckMenuItem"));
+ }
+
+ wxMenuItemBase::Check(check);
+}
+
+void wxMenuItem::SetText(const wxString& text)
+{
+ // don't do anything if label didn't change
+ if ( m_text == text )
+ return;
+
+ wxMenuItemBase::SetText(text);
+ OWNER_DRAWN_ONLY( wxOwnerDrawn::SetName(text) );
+
+ HMENU hMenu = GetHMenuOf(m_parentMenu);
+ wxCHECK_RET( hMenu, wxT("menuitem without menu") );
+
+#if wxUSE_ACCEL
+ m_parentMenu->UpdateAccel(this);
+#endif // wxUSE_ACCEL
+
+ UINT id = GetRealId();
+ UINT flagsOld = ::GetMenuState(hMenu, id, MF_BYCOMMAND);
+ if ( flagsOld == 0xFFFFFFFF )