I understand. I wonder if that would make sense to register from LazPaint application, so that one could change the content of the menu.
Ah OK, I see what you think.
The real way of doing this is with a COM .dll, there is something, somewhere, at embarcadero that deals with this, and is compatible with lazarus, so you can handle the menu from a pascal program... And you can manage the things that are shown from code.
But I dont have the link right now, and also I remember you need to be registered in order to download the file.
Try google "COM shell extension pascal"
Ok...
Here it is
https://github.com/RRUZ/delphi-dev-shell-toolsAnd this
http://cc.embarcadero.com/item/27554____________
But, of course you can change registry with a pascal program too
I already made something but does not include this. Check:
http://wiki.lazarus.freepascal.org/FileAssociationBasically I tested this things with LazPaint setup first
And also now I'm using it with some of my applications.
The main thing to take into consideration is the user privileges, in order to modify 'HKLM' you must run lazpaint as admin for example..
Or register only for the current user the settings: this is the behavior that is used, for example, by 7zip, VLC and other apps.
____________
Also I 'discovered' a way to register these commands for .png (for example) also if the .png is NOT associated with lazpaint. How it works? There is a subkey:
Software\Classes\SystemFileAssociations
There are stored a set of global menu items that has less visibility but are always displayed does not matter the program is associated with an extension.
Example:
.png always has set as desktop background, edit, print, preview and others (these are called verbs)... but these are displayed at last position where the 'vendor' verbs at top.
So with current setup I made:
.png associated with lazpaint will display "Quick edit" and "Quick effects" and then the other menus. But if I associate .png with Photo Viewer there will NOT be Quick edit and Quick effects.
This can be changed putting the verbs inside the key SystemFileAssociations\.png, so these menus will be always displayed.
For example, recently I've added:
SystemFileAssociations\.png\shell\optimize\command
"C:\optipng-0.7.5-win32\optipng.exe" "%1"
And is always displayed, at last position (I mean after lazpaint commands...) but always, not matter if associated lazpaint or wathever
____________
Too much information to process, the only way to understand it is creating a separate user account (to dont break your current user registry) and start playing with the registry, or even better a virtual machine.