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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Find all Child windows

Find all Child windows

Scheduled Pinned Locked Moved C#
helpquestion
6 Posts 4 Posters 1 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.
  • U Offline
    U Offline
    User 10603967
    wrote on last edited by
    #1

    I am able to find the Parent Window but I would like to have the list of all its Child Windows, in order to find their Class Name & Window Name, can anyone help? I have used: [DllImport("user32.dll", CharSet = CharSet.Unicode)] static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle); [DllImport("user32.dll")] private static extern IntPtr FindWindow(string className, string windowName); Thanks in-advanced :((

    D 1 Reply Last reply
    0
    • U User 10603967

      I am able to find the Parent Window but I would like to have the list of all its Child Windows, in order to find their Class Name & Window Name, can anyone help? I have used: [DllImport("user32.dll", CharSet = CharSet.Unicode)] static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle); [DllImport("user32.dll")] private static extern IntPtr FindWindow(string className, string windowName); Thanks in-advanced :((

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      ...and? You build your own list. There is no function that returns the entire child window handles tree. You have to build it yourself. I suggest reading the documentation on the EnumChildWindows[^] function.

      A guide to posting questions on CodeProject

      How to debug small programs
      Dave Kreskowiak

      U 1 Reply Last reply
      0
      • D Dave Kreskowiak

        ...and? You build your own list. There is no function that returns the entire child window handles tree. You have to build it yourself. I suggest reading the documentation on the EnumChildWindows[^] function.

        A guide to posting questions on CodeProject

        How to debug small programs
        Dave Kreskowiak

        U Offline
        U Offline
        User 10603967
        wrote on last edited by
        #3

        While I am waitting for a reply I found this and it works http://www.experts-exchange.com/Programming/Languages/.NET/Q\_26708666.html Thank you anyway :)

        M 1 Reply Last reply
        0
        • U User 10603967

          While I am waitting for a reply I found this and it works http://www.experts-exchange.com/Programming/Languages/.NET/Q\_26708666.html Thank you anyway :)

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Member 10636998 wrote:

          While I am waitting for a reply

          That is called RESEARCH and should be done BEFORE posting the question.

          Never underestimate the power of human stupidity RAH

          V 1 Reply Last reply
          0
          • M Mycroft Holmes

            Member 10636998 wrote:

            While I am waitting for a reply

            That is called RESEARCH and should be done BEFORE posting the question.

            Never underestimate the power of human stupidity RAH

            V Offline
            V Offline
            V 0
            wrote on last edited by
            #5

            Sorry, I disagree with this reply. At least he made an effort of trying to find a solution. You're never sure to get a reply...

            V.
            (MQOTD rules and previous solutions)

            M 1 Reply Last reply
            0
            • V V 0

              Sorry, I disagree with this reply. At least he made an effort of trying to find a solution. You're never sure to get a reply...

              V.
              (MQOTD rules and previous solutions)

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              I am trying to encourage the OP to do some research before posting, I find 95% of my questions have already been answered somewhere, usually many times. Also note that I did not down vote the OP, that would have been very unreasonable.

              Never underestimate the power of human stupidity RAH

              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