Shoutbox

[Problem] MenuButtonControl - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Problem] MenuButtonControl (/showthread.php?tid=62444)

[Problem] MenuButtonControl by Rene on 07-03-2006 at 05:12 PM

Hi,

I got this code:

code:
                                        <Control xsi:type="MenuButtonControl" Id="BtnDevvers">
                                                <Position Top="0" Width="93" Left="2" />
                                                <Attributes>
                                                        <AlwaysDisplayBorder>false</AlwaysDisplayBorder>
                                                        <AdjustArrowPos>true</AdjustArrowPos>
                                                </Attributes>
                                                <Menu Id="MnuOptions" VPos="Bottom" HPos="CenterLeft">
                                                      <MenuEntry Id="MnuDo">An menu</MenuEntry>
                                                </Menu>
                                                <Image Margin="4">
                                                       <Name>buddy-online</Name>
                                                </Image>
                                                <Caption>Online</Caption>
                                        </Control>

But with what of function can i checked that one person clicked 'MnuDo' ?
I don't can't find an, i have tested a lot.
RE: [Problem] MenuButtonControl by Felu on 02-11-2007 at 06:06 AM

quote:
Originally posted by Flash26
wow old post no answer
i try it to but that say one error
code:
Function called: OnEvent_MenuClicked
Error: Objet requis.
       Line: 843. Code: -2146827864.
Function OnEvent_MenuClicked returned an error. Code: -2147352567

whats code are you using?

please don't bump old threads
RE: [Problem] MenuButtonControl by Flash on 02-11-2007 at 08:17 AM

Felu now menu work fine, but i need to disable some menu entry u know how?
i try with thAt but that not work, because its a children or i dont know lol?

code:
function ControlEnable(PlusWnd, sControlId, bState) {
    var hCtrl = PlusWnd.GetControlHandle(sControlId);
    if (arguments.length === 3) Interop.Call("User32", "EnableWindow", hCtrl, bState);
    return Interop.Call("User32", "IsWindowEnabled", hCtrl);
}


RE: [Problem] MenuButtonControl by Felu on 02-11-2007 at 10:15 AM

Sorry :$, didn't get you there. No you cannot disable them as there is no way to get the handle. And moreover those are just parts of a control, not a control itself.


RE: [Problem] MenuButtonControl by Flash on 02-11-2007 at 10:42 AM

ok thx felu, i try with more menucontrol :P


RE: [Problem] MenuButtonControl by deAd on 02-11-2007 at 03:31 PM

It's actually possible to disable them, but it'd probably be a messy way to do it. Since you receive an event when the actual menu button is clicked (which is when the menu is opened) you can find the handle and modify items when it opens.