Thread: MFC & TreeView Control Question

  1. #1
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644

    MFC & TreeView Control Question

    Is it possible to rename a highlighted file in a treeview control?

    If so, could someone point me in the right direction?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    I'm assuming you mean edit... here's a start.

    gg

  3. #3
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by Codeplug
    I'm assuming you mean edit... here's a start.

    gg
    That works 90% of what I want, thanks.

    After looking at that, I have another question. Is it possible to get the string of the new file, and see if it has a certain extension, and if not, don't allow the rename?

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Handle the TVN_BEGINLABELEDIT Notification and send TVM_GETEDITCONTROL in the handler.
    (see remarks section in above link)

    gg

  5. #5
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by Codeplug
    Handle the TVN_BEGINLABELEDIT Notification and send TVM_GETEDITCONTROL in the handler.
    (see remarks section in above link)

    gg
    Thank you. I will try that out and see how it goes.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. (Visual C++) MFC Tree Control to do a settings page
    By guitarist809 in forum Windows Programming
    Replies: 6
    Last Post: 08-30-2008, 11:31 PM
  2. Visual C++ 2008 MFC Tab Control
    By guitarist809 in forum Windows Programming
    Replies: 2
    Last Post: 07-20-2008, 09:37 AM
  3. RickEdit control question
    By nomer in forum Windows Programming
    Replies: 6
    Last Post: 03-03-2006, 07:00 PM
  4. Question about document/view app in MFC
    By hpy_gilmore8 in forum Windows Programming
    Replies: 2
    Last Post: 05-06-2004, 07:51 PM
  5. MFC Dialog App Screen Refresh Question
    By Scotth10 in forum Windows Programming
    Replies: 2
    Last Post: 10-18-2002, 02:07 PM