Tree Control select method called itself
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Tree Control select method called itself

  1. #1
    Join Date
    Jul 2006
    Posts
    203

    Tree Control select method called itself

    I have tree control on left pane and list control on right pane. For list control i'm displaying a pop up menu when i right click on any item in list control. When i right click on any item in list control and select any option from pop menu, tree control select item(TVE_SELECT) is called automatically. This TVE_SELECT is called for the selected item in tree control.

    Suppose i create tree/list control in one exe and i want to do all tree/list control operations like insert items, display popup menu etc from a dll then how to solve above problem from dll code. I dont have exe code.

    I want to know how to refresh tree/list control from dll? And how to stop tve_select from dll if it called automatically.
    Last edited by MFCQuery; July 25th, 2008 at 03:50 AM.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,011

    Re: Tree Control select method called itself

    What is TVE_SELECT?
    And how is it called and who does it call?
    What type of App are you developing: MFC, Win32, Doc/View, SDI/MDI/..., ?
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2006
    Posts
    203

    Re: Tree Control select method called itself

    Sorry it's NM_CLICK not TVE_SELECT.
    And the application is dll in VC++.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,011

    Re: Tree Control select method called itself

    I still cannot understand the logic of your software: what and how are you trying to accomplish and what are your problems?
    Which type of dll?
    Could you provide further clarification?
    Victor Nijegorodov

  5. #5
    Join Date
    Jul 2006
    Posts
    203

    Re: Tree Control select method called itself

    Ok Let me explain this in detail.
    I have one MFC dialog base application. On the dialog i have tree control and list control. Lets take example of window explorer. In left pane we have directories and in right pane we display subdirectories and files of this directory. All these data i'm storing in a dll (directories/subdirectories). So when i click on any directory in left pane i call a function of dll where i pass this directory name. Dll searches all subdirectories and files and insert in right pane.
    From dll i can insert item in tree/list control in some variable which i pass from exe. But i dont know how to call refresh method of list/tree control from dll to make items visible. I have tried to implement dll in regular dll or ATL com dll.
    Now suppose i dont have exe code but i have exe. I have dll code. Now from this dll code i have to insert items and refresh them.

    Let me explain the problem now.
    Suppose i click on any directory in left pane, exe call one function of dll which search all subdirectories and files and insert them in variable which i pass from dll. So i can see all sub directories in right pane. Now Suppose if user right click mouse on any item in left pane a popup menu is display which contains "Show". If i click on show then i want same functionalities like NM_CLICK. For this i call same dll function which insert all subdirectories and files in right pane. But it doesn't display them. So here i think i need to refresh right pane from dll. But i dont have idea how to do this.
    Last edited by MFCQuery; July 25th, 2008 at 05:09 AM.

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,011

    Re: Tree Control select method called itself

    Quote Originally Posted by MFCQuery
    ... For this i call same dll function which insert all subdirectories and files in right pane. But it doesn't display them. So here i think i need to refresh right pane from dll. But i dont have idea how to do this.
    Could you show the code you are using to "insert all subdirectories and files in right pane"?
    Victor Nijegorodov

  7. #7
    Join Date
    Jul 2006
    Posts
    203

    Re: Tree Control select method called itself

    I pass pointer to list control. And in dll i use
    list control pointer->InsertItem("item name",......);

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,011

    Re: Tree Control select method called itself

    I didn't ask you about the method used to insert item in the list control.
    But if you don't want to show your code that appears to not work, then sorry, I should give up...
    Victor Nijegorodov

  9. #9
    Join Date
    Sep 2008
    Posts
    8

    Re: Tree Control select method called itself

    Dear Sir, am using SDI application, i created list control, want to insert treecontrol in listcontrol, can anyone help me?

    Thanks
    Geetha.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center