Results 1 to 6 of 6

Thread: Import registry key's subkeys into listbox [SOLVED]

  1. #1

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692

    Import registry key's subkeys into listbox [SOLVED]

    Anyone know which API function looks inside a given registry key, and lists all its subkeys?

    I'm making a mail application, and need this to load a list of profiles.
    Last edited by hothead; Nov 14th, 2003 at 09:42 PM.

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    Hothead,

    No API does it but you can enumerate through a Key once you position yourself there.

    Here is a project I found that may help.
    Attached Files Attached Files

  3. #3

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692
    That's almost like what I need. However, I don't want it enumerating the subkey's subkeys or the subkey's parent. I'm sure it can be set this way, I just don't know how yet.

  4. #4

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692
    Forgot to post an example of what it's doing.

    Under HKEY_LOCAL_MACHINE\SOFTWARE, I have a key named Gitmail. Then I have a key called Profiles under that. Now when I set this program you gave me to list HKEY_LOCAL_MACHINE\SOFTWARE\Gitmail\Profiles, it lists the Profiles key, its subkeys, and its subkey's subkeys. I just want it to show the subkeys that branch directly off the Profiles key.

    In other words, instead of it listing this:

    Profiles
    Account 1
    Main Settings
    Account 2
    Main Settings

    I want it to list like this:

    Account 1
    Account 2
    Last edited by hothead; Nov 13th, 2003 at 11:18 PM.

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    hothead,

    You have the code now... Just eliminate the subkeys code.

  6. #6

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692
    Ok, I didn't know where it was getting the info. I have it figured out now. Thanks a lot.

Posting Permissions

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



Click Here to Expand Forum to Full Width