+ USHORT uFlag = SHORT1FROMMR(::WinSendMsg( GetHMenuOf(m_parentMenu)
+ ,MM_QUERYITEMATTR
+ ,MPFROM2SHORT(GetId(), TRUE)
+ ,MPFROMSHORT(MIA_CHECKED)
+ ));
+
+ return (uFlag & MIA_CHECKED);
+} // end of wxMenuItem::IsChecked
+
+wxString wxMenuItemBase::GetLabelFromText(
+ const wxString& rsText
+)
+{
+ wxString sLabel;
+
+ for (const char* zPc = rsText.c_str(); *zPc; zPc++)
+ {
+ if (*zPc == wxT('~') || *zPc == wxT('&'))
+ {
+ //
+ // '~' is the escape character for OS/2PM and '&' is the one for
+ // wxWidgets - skip both of them
+ //
+ continue;
+ }
+ sLabel += *zPc;
+ }
+ return sLabel;
+} // end of wxMenuItemBase::GetLabelFromText
+
+//
+// Radio group stuff
+// -----------------
+//
+void wxMenuItem::SetAsRadioGroupStart()
+{
+ m_bIsRadioGroupStart = TRUE;
+} // end of wxMenuItem::SetAsRadioGroupStart
+
+void wxMenuItem::SetRadioGroupStart(
+ int nStart
+)
+{
+ wxASSERT_MSG( !m_bIsRadioGroupStart
+ ,_T("should only be called for the next radio items")
+ );
+
+ m_vRadioGroup.m_nStart = nStart;
+} // wxMenuItem::SetRadioGroupStart
+
+void wxMenuItem::SetRadioGroupEnd(
+ int nEnd
+)
+{
+ wxASSERT_MSG( m_bIsRadioGroupStart
+ ,_T("should only be called for the first radio item")
+ );
+ m_vRadioGroup.m_nEnd = nEnd;
+} // end of wxMenuItem::SetRadioGroupEnd