What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Patchou we cant get the Handle of Menu?

[Help] Patchou we cant get the Handle of Menu?
Author: Message:
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. [Help] Patchou we cant get the Handle of Menu?
i can destroy or close a Menu open from MenuButton control with a cmd like this
code:
i tyed
var hand = PlusWnd1.GetControlHandle('MnuCED')
var wh = PlusWnd1.handle
var i = Interop.Call("User32","GetMenu",wh)
var ii = Interop.Call("User32","IsMenu",hand)
var iii = Interop.Call("User32","DestroyMenu",hand)
Debug.Trace('Menu test: ' +wh+' ' +hand+' ' +i+' ' +ii+ ' '+iii)

Menu test: 7406936 0 0 0 0

i see i canT get the handle for the menu with getcontrolhandle
that not work, but a cmd exist for close the menu?
code:
<Control xsi:type="MenuButtonControl" Id="BtnAdd_Edit">
                <Position Top="92" Left="9" Width="70" Height="14"/>
                <Attributes>
                    <AlwaysDisplayBorder>true</AlwaysDisplayBorder>
                </Attributes>
                <TextColor><GlobalColor>black</GlobalColor></TextColor>
                <Menu Id="MnuCED" VPos="Bottom" HPos="CenterLeft">

This post was edited on 07-05-2007 at 05:40 PM by Flash.
07-05-2007 04:35 PM
Profile PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [Help] Patchou we cant get the Handle of Menu?
If you are just trying to close a menu which is open, simulate a click on the button which opened it (this will open it if it is closed) or simulate a click on an empty part of the dialog (make sure it's empty so you don't end up clicking another control by accident).

If you really need the handle, you can try here for a way to get a menu handle for the latest version of Plus!. Please read the post carefully so you understand the limitations and dangers of using this.

This post was edited on 07-05-2007 at 05:52 PM by deAd.
07-05-2007 05:51 PM
Profile PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [Help] Patchou we cant get the Handle of Menu?
Damn that code work fine but now i cant only close lol
if a destroymenu that DESTROY haha and the menu not reappear after :|
so before that i tryed SetFocus on a editbox but i think i need a click to
My script: Psdp
07-05-2007 06:47 PM
Profile PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [Help] Patchou we cant get the Handle of Menu?
Don't use DestroyMenu on the handle the other code produces, because the handle is reused.
07-05-2007 06:54 PM
Profile PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [Help] Patchou we cant get the Handle of Menu?
so i use other button now lol
hide button menu show button normal :| too easy code

thx dead very much for your help ;)

This post was edited on 07-05-2007 at 07:52 PM by Flash.
My script: Psdp
07-05-2007 07:52 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On