I have made an addin to add a favourites menu to RadASM.

This addin will add a menu to the main menu bar that will let you add the current project to your favourites. The fav list is not affected by the MRU so it allows you to keep your main projects available as a menu item without having them knocked off the MRU every time you open 4 other projects. The main advantage is to be able to have quick access to critical projects but still have the MRU for what it is meant to do.

The favourites list is fully manageable and uses a separate INI file so that upgrades to RadASM will not overwrite it. You can specify a menu label for each project or use the description you entered when it was created as a default. To move items up or down in the menu order simply drag them where they should go in the Manager dialog. Right click on an item in the Manager dialog to delete it. No changes that you make in the Manager dialog are saved until you press OK.

This is a first test, please report any bugz.
Posted on 2004-03-21 21:07:43 by donkey
Works great! And is just what I needed.

Posted on 2004-03-21 21:42:56 by JimmyClif
Thanks JimmyClif,

I have wanted to do this one for a while and finally got around to finishing it this weekend. There was a problem with the stupid LB_ITEMFROMPOINT message, I should have read the API ref on it. I assumed that it returned LB_ERR if the cursor was not on an item, like every other LB_ message. But it reports a no-hit in the high-order word and passes the lo-order normally, schitzo-API as usual :mad:

Anyway, the end result was that the context menu in the manager would open anywhere, it has been fixed.

Converted UTC file times to local times.
Posted on 2004-03-21 21:59:52 by donkey
Just a minor cosmetic update. When you right clicked an item in the Favourites Manager the project details would not be updated. I have corrected this and uploaded a new version.
Posted on 2004-03-22 12:01:45 by donkey
Hello Donky
This Addin is a very practical idea. :alright:

I tested it and found that when I want to delete all Fav-Items using the Fav-Manager, I can't delete the last one. It simply remains one.


Posted on 2004-03-23 01:38:38 by Biterider
Hi Biterider,

Yes, I had missed that one. I checked to make sure that there was data to be processed in the listbox and cleared the INI and exited if there was none. The routine would properly update the INI file but the menu was not being emptied, I have fixed it to free the memory and remove the items from the menu. New upload at the top.
Posted on 2004-03-23 01:52:05 by donkey
Redoing the delete function has revealed a problem with the memory deallocation scheme that I was using. There was a problem with the handle values passed because the values in the MENUITEMINFO structure were being overwritten by the GetMenuItemInfo function, I had assumed that I only had to set cbSize once and it would remain static, this does not appear to be true. This seems only to be the case in Win2K but it would result in the global blocks not being freed and memory accumulating until RadASM exited. The amount of memory was trivial and inconsequential if you did not edit the menu often but could conceivably add up with over 10 or 20 edits with 50 or more favourites. It has been corrected and a new upload is available.
Posted on 2004-03-23 03:01:34 by donkey
For those people who still use NT4 or Win95 the addin could GPF if you loaded it. The Get/SetMenuInfo functions are not available in those OS versions. I have loaded them manually so that the favourites will still be fully functional under those OS versions but the custom colors won't be added to the menu. Since this addin is now added to RadASM 2042, I have begun incrementing the version numbers, the NT4/95 compatible version is, it will still work the same as before in all other OS versions.
Posted on 2004-03-23 12:16:44 by donkey