What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] TrackPopupMenu

[Help] TrackPopupMenu
Author: Message:
Hanumanji
New Member
*


Posts: 5
Joined: Jan 2005
O.P. [Help] TrackPopupMenu
Hi!.... I have this problem with TrackPopupMenu... When I try to popup a menu it returns an error message:

code:
Bad calling convention detected for "TrackPopupMenu" in "user32". The function must be declared with __stdcall and called with the appropriate number of parameter.

What could be wrong? Here is the code i've used.... and yes, the constants are defined.

code:
hMenu = Interop.Call('user32', 'CreatePopupMenu');
Interop.Call('user32', 'AppendMenuW', hMenu, MF_STRING, 301, 'Test');
var POINTAPI = Interop.Allocate( 8);
Interop.Call('user32', 'GetCursorPos', POINTAPI);   
ret = Interop.Call('user32','TrackPopupMenu', hMenu, 0, POINTAPI.ReadDWORD(0), POINTAPI.ReadDWORD(4), Wnd.Handle, 0);


Thanks!
09-28-2007 09:27 AM
Profile E-Mail PM Find Quote Report
Hanumanji
New Member
*


Posts: 5
Joined: Jan 2005
O.P. RE: [Help] TrackPopupMenu
Nevermind, I missed one parameter :)

code:
ret = Interop.Call('user32','TrackPopupMenu', hMenu, 0, POINTAPI.ReadDWORD(0), POINTAPI.ReadDWORD(4), 0, Wnd.Handle, 0);

Sorry!
09-28-2007 09:36 AM
Profile E-Mail 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