@@ -3675,16 +3675,36 @@ CPoint menupoint (Left, Top);
3675
3675
if (vPopup.size () > 1 )
3676
3676
vPopup.pop_back (); // drop last item
3677
3677
}
3678
- else if (strItem.Left (1 ) == " ^" )
3679
- vPopup.back ()->AppendMenu (MF_STRING | MF_GRAYED, 0 , strItem.Mid (1 ));
3680
- else
3681
- {
3682
- strMXP_menu_item [j] = strItem;
3683
- vPopup.back ()->AppendMenu (MF_STRING | MF_ENABLED, MXP_FIRST_MENU + j, strItem);
3684
- j++;
3685
- if (j >= MXP_MENU_COUNT)
3686
- break ;
3678
+ else
3679
+ {
3680
+ // flags - will always be a string
3681
+ UINT iFlags = MF_STRING;
3682
+
3683
+ while (strItem.Left (1 ) == " +" ||
3684
+ strItem.Left (1 ) == " ^" )
3685
+ {
3686
+ // leading + means tick it
3687
+ if (strItem.Left (1 ) == " +" )
3688
+ iFlags |= MF_CHECKED;
3689
+ // and a carat means disabled
3690
+ else if (strItem.Left (1 ) == " ^" )
3691
+ iFlags |= MF_GRAYED;
3692
+
3693
+ strItem = strItem.Mid (1 ); // get rid of first character
3694
+ } // end of while
3695
+
3696
+ if (iFlags & MF_GRAYED)
3697
+ vPopup.back ()->AppendMenu (iFlags, 0 , strItem);
3698
+ else
3699
+ {
3700
+ strMXP_menu_item [j] = strItem;
3701
+ vPopup.back ()->AppendMenu (iFlags, MXP_FIRST_MENU + j, strItem);
3702
+ j++;
3703
+ if (j >= MXP_MENU_COUNT)
3704
+ break ;
3705
+ }
3687
3706
}
3707
+
3688
3708
}
3689
3709
3690
3710
// without this line the auto-enable always set "no items" to active
0 commit comments