Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to realize Web control's context menu by c#

How to realize Web control's context menu by c#

Scheduled Pinned Locked Moved C#
csharptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nakey_yang
    wrote on last edited by
    #1

    :zzz:somebody tell me can use IDocHostUIHandler can relize this idea,but how can do this by c#? ok

    N 1 Reply Last reply
    0
    • N nakey_yang

      :zzz:somebody tell me can use IDocHostUIHandler can relize this idea,but how can do this by c#? ok

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      IDocHostUIHandler is defined in the MsHtmHst.idl file. Basic idea is you can write your own idl file and use the midl compiler to generate the type library. Following that you can use the .NET Framework's command line tool tlbimp to generate a .NET assembly you can include within your application.

      [
      uuid(47F05070-FD66-45cc-AD99-74260F94A16B)
      ]
      library WebInterop
      {
      import "MsHtmHst.idl";
      enum tagDOCHOSTUIDBLCLK;
      enum tagDOCHOSTUIFLAG;
      enum tagDOCHOSTUITYPE;
      interface ICustomDoc;
      interface IDocHostShowUI;
      interface IDocHostUIHandler;
      interface IDocHostUIHandler2;
      interface IHostDialogHelper;
      }

      Then create the type library:

      midl WebInterop.idl /tlb bin\WebInterop.tlb

      Then create the .NET assembly:

      tlbimp bin\WebInterop.tlb /out:bin\WebInterop.dll

      Now create a class that inherits from IDocHostUIHandler and of course implements the appropriate methods. - Nick Parker
      My Blog | My Articles

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups