+bool wxMenuBar::IsEnabledTop(size_t pos) const
+{
+ wxCHECK_MSG( pos < GetMenuCount(), false, wxS("invalid menu index") );
+ WinStruct<MENUITEMINFO> mii;
+ mii.fMask = MIIM_STATE;
+ if ( !::GetMenuItemInfo(GetHmenu(), pos, TRUE, &mii) )
+ {
+ wxLogLastError(wxS("GetMenuItemInfo(menubar)"));
+ }
+
+ return !(mii.fState & MFS_GRAYED);
+}
+