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. setting the behavior of the context popup menu

setting the behavior of the context popup menu

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresworkspace
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.
  • T Offline
    T Offline
    trustno1
    wrote on last edited by
    #1

    hi everybody, i had a sdi project, based on treeview. i want to setup context popup menu in such way so that the popup menu only pops up whenever the user right click on a node of the tree, sorta like how the popup menu works in windows explorer. any suggestion is welcome.. thanx in advance.

    J 1 Reply Last reply
    0
    • T trustno1

      hi everybody, i had a sdi project, based on treeview. i want to setup context popup menu in such way so that the popup menu only pops up whenever the user right click on a node of the tree, sorta like how the popup menu works in windows explorer. any suggestion is welcome.. thanx in advance.

      J Offline
      J Offline
      Joseph Dempsey
      wrote on last edited by
      #2

      you will need to setup a handler for a message that is reflected from the tree view back to the parent. Check this message, NM_RCLICK. Then you need to use the tree controls hittest functions to determine if the mouse position is on one of the nodes in question. Once you have that you can display your context menu. Hope that helps. For more info search msdn for the NM_RCLICK message and also lookup message reflection for a broader overview of the topic. Good luck. Joseph Dempsey joseph_r_dempsey@yahoo.com "Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning." --anonymous

      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