March 28, 2024, 11:05:49 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


RemoveMenu

Started by ExMember001, October 08, 2007, 11:04:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

October 08, 2007, 11:04:11 AM Last Edit: October 08, 2007, 11:09:31 AM by KrYpT
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?

Bruce Peaslee

I haven't tried it (dinner time here), but try putting it before the first Detach.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

ExMember001

nope didnt works, i've change my mind anyway... using different methods

Bruce Peaslee

I have now tried various permutations and can't get the desired result...   :-\
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Rock Ridge Farm (Larry)

Not exactly what you want - but you can set it to blank and disable it.

ExMember001

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 ;)