I have a Browser Helper Object - DLL written in Delphi, which can be loaded with Internet Explorer. Something like:
[login to view URL]
I need to modify Internet Explorer context menu (popup manu) on a web page - add my own items, and of course respond to clicks. Working example with a screenshot can be found here:
[login to view URL]
I need to:
1) add items at TOP, at the BOTTOM or in a MIDDLE of a context menu,
2) add item with SUB-MENU,
3) detect for WHAT HTML ELEMENT we display a context menu - (IHTMLEventObj -> srcElement) - for example if a context menu is displayed for an image or a text. I need to detect element type (img, object, text...), element URL, and add different menu items for:
- images, including background images (for example background in a table),
- selected text (+ read selected text)
- form elements,
- FLASH (/ Shockwave / Authorware ?) objects.
I only need some SIMPLE examples - e.g. for image context menu we add at the top 'This is an image', and after clicking this menu item, we display a MessageBox.
*********** How it can be done is described in:
0) WORKING example
[login to view URL]
1) Scenario 3 at:
[login to view URL]
2) Similar approach in Delphi:
[login to view URL]
3) See also function ShowRightClickMenu in [login to view URL] in Embedded WebBrowser:
[login to view URL]
4) Another article:
[login to view URL]
As I know flash animations have own context menu - handling them may be different than IDocHostUIHandler -> ShowContextMenu. More info at
[login to view URL]
[login to view URL]
Finally I will need a working sample DLL + source code, that can be compiled in Delphi 5 (PRO).