Shoutbox

Custom Popup Menus - 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: Custom Popup Menus (/showthread.php?tid=75149)

Custom Popup Menus by splinter98 on 06-07-2007 at 04:55 PM

I have just started learning JScript and the MsgPlus Scripting API and have, for the last few days, been writing some code (which I might release when I have finished it).

But I was wondering if it is possible and how to go about coding a popup menu that would be triggered via an OnWindowidEvent_LstViewRClicked.

I have searched the forums and searched the documentation for anything remotely linking towards this and so far haven't found a script that does something similar, (Yes I know you can produce one with a MenuButton, but can you without?).

This would help with the functionality of my script as well as would provide and easy to use interface that is clean without loads of buttons or lots of mouse clicks.

Thanks in advance

Splinter98


RE: Custom Popup Menus by Matti on 06-07-2007 at 05:07 PM

This can be done by using advanced scripting methods. You'll have to create a popup menu using CreatePopupMenu, add items to it and use the TrackPopupMenu function to let it pop up and retrieve the clicked item. I'll try to make a snippet for that, hang on...

Here you go! :)


RE: Custom Popup Menus by matty on 06-07-2007 at 05:13 PM

Matty's reply to Shell_NotifyIconW Example


RE: Custom Popup Menus by splinter98 on 06-07-2007 at 07:09 PM

Thanks for the code I have tried it and confirmed that it works :D

The best bit about the code was that it wasn't 'off the shelf' which meant that just implementing the code as it stood, it would not work.

All the Window ID's don't relate to each other (For the same Window ID), one function uses MyWindow, another uses WndSubclass - that would be due to basing it on other codes and cobbling it all together but does make the user require to edit it which I believe is good way to how to learn how the code works and the language API.

I hope that makes sense.

Splinter98

Edit: Next Challenge is to integrate Submenus - Not necessary for my scirpt needed but might be useful for someone else (even for the TrayIcon script)