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. Renaming Tree Nodes

Renaming Tree Nodes

Scheduled Pinned Locked Moved C / C++ / MFC
data-structurestutorial
1 Posts 1 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.
  • L Offline
    L Offline
    laiju
    wrote on last edited by
    #1

    I have used PreTranslate message to capture the renaming of Tree Nodes. I am capturing the VK_RETURN key to complete the renaming of tree nodes. But the tree control can also complete the rename operation by clicking the mouse anywhere on the tree control after typing the new string for the folder. I dont want the rename to take place by mouse click. I know how to revert the old string of the tree node .But I dont know what event completed the rename operation .Like if i can differentiate the end of rename operation by mouse or by keyboard i can block the mouse rename operation. I tried to do the following filter . void CTreeCtrlBar::OnTvnEndlabeleditTree1(NMHDR *pNMHDR, LRESULT *pResult) { NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; if (pNMTreeView->action == TVC_BYKEYBOARD) AfxMessageBox("End by ENTER Key"); else if (pNMTreeView->action == TVC_BYMOUSE) AfxMessageBox("End by mouse click"); ************************************************************************** But always the condition pNMTreeView->action == TVC_BYMOUSE gets satisfied even when I pressed ENTER key to complete the rename operation. Any suggestions please. laiju

    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