IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: ExMember001 on October 08, 2007, 11:04:11 AM

Title: RemoveMenu
Post by: ExMember001 on October 08, 2007, 11:04:11 AM
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?
Title: Re: RemoveMenu
Post by: Bruce Peaslee on October 08, 2007, 06:23:49 PM
I haven't tried it (dinner time here), but try putting it before the first Detach.
Title: Re: RemoveMenu
Post by: ExMember001 on October 08, 2007, 08:05:16 PM
nope didnt works, i've change my mind anyway... using different methods
Title: Re: RemoveMenu
Post by: Bruce Peaslee on October 08, 2007, 08:58:16 PM
I have now tried various permutations and can't get the desired result...   :-\
Title: Re: RemoveMenu
Post by: 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.
Title: Re: RemoveMenu
Post by: ExMember001 on October 09, 2007, 05:53:00 PM
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 ;)