I'm trying to remove a menuitem at menu initiation
i'm using the example from the help file out of the m.attach(hmenu):
PopotteMain::OnMenuInit(unsigned INT hMenu),INT
{
m.Attach(hMenu);
m.CheckMenuItem(16,L_check = true);
m.CheckMenuItem(17,R_check = true);
m.CheckMenuItem(18,Url_check = true);
m.CheckMenuItem(39,Lire_check = true);
m.EnableMenuItem(8,m_Red->CanUndo());
if langage <> "Francais"
{
m.EnableMenuItem(31, 0);
m.EnableMenuItem(32, 0);
m.EnableMenuItem(33, 0);
m.EnableMenuItem(34, 0);
}
m.Detach();
m.Attach(GetMenu());
m.RemoveMenu(3, 34);
m.Detach();
return false;
}
but nothing get remove. what do i need to do?
I haven't tried it (dinner time here), but try putting it before the first Detach.
nope didnt works, i've change my mind anyway... using different methods
I have now tried various permutations and can't get the desired result... :-\
Not exactly what you want - but you can set it to blank and disable it.
Quote from: Rock Ridge Farm (Larry) on October 09, 2007, 05:19:58 AM
Not exactly what you want - but you can set it to blank and disable it.
that's what i'm doing in the code above
but i had decide to remove them at creation ... easyer ;)