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 / C++ / MFC
  4. Context menu in CHtmlView question.

Context menu in CHtmlView question.

Scheduled Pinned Locked Moved C / C++ / MFC
questionbusinesshelptutorial
3 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.
  • M Offline
    M Offline
    Michael Liu
    wrote on last edited by
    #1

    I tried to use OnContextMenu and OnRButtonDown to popup the context menu when click right mouse button in a CHtmlView class. When I test it, no menu popup. How to fix it? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)

    A 1 Reply Last reply
    0
    • M Michael Liu

      I tried to use OnContextMenu and OnRButtonDown to popup the context menu when click right mouse button in a CHtmlView class. When I test it, no menu popup. How to fix it? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      OnContextMenu and OnRButtonDown are MFC command handlers. The trouble is that CHtmlView derives from a CView but provides no real support for it. CHtmlView is basically a wrapper around the web browser ActiveX control. You can check out yourself by the way because we have all the code for it. So all right clicks are in fact consumed by the ActiveX. The good news is that the web browser control has a mechanism to supersede context menus. You have to implement the IDocHostUIHandler interface. You have built-in samples in MSDN library. (and even in codeproject as far as I remember).

      M 1 Reply Last reply
      0
      • A Anonymous

        OnContextMenu and OnRButtonDown are MFC command handlers. The trouble is that CHtmlView derives from a CView but provides no real support for it. CHtmlView is basically a wrapper around the web browser ActiveX control. You can check out yourself by the way because we have all the code for it. So all right clicks are in fact consumed by the ActiveX. The good news is that the web browser control has a mechanism to supersede context menus. You have to implement the IDocHostUIHandler interface. You have built-in samples in MSDN library. (and even in codeproject as far as I remember).

        M Offline
        M Offline
        Michael Liu
        wrote on last edited by
        #3

        Thank you. It's a good point. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)

        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