Hi long,
Google and Yahoo toolbars are using a COM component that adds the Context
Menu sub-menus with their icons. Most probably they use the Menu API's in
the User API (CreateMenu, DrawIcon etc..) as you would when creating menus
dynamically in a C++ app. The APIs all use the hwnd of the menu item, so all
you need to find is the hwnd of the menu item in the context menu that you
want to add the icon for.
There is an excellent example of using the createPopup method to create your
own dynamic context menu in the MSDN library, but this is only for your own
web documents. Since Context menu's can be disabled
(body.onContextMenu="return false:") creating you own COM context menu for
IE is realy just a waste of time.
Regards.