title: C/C++ Hook to access the window's elements of a program
body: <p>I'm trying to access window's elements of a program, of which I have only the binaries and installed stuff.</p>
  
  <p>For example, I want to click on a certain item of a certain listbox in an automated way.</p>
  
  <p>I'm only interested in  accessing one listbox of one window of the program, but this would help me create a very good macro (the list box is full of "expands", it's long, and dynamic).</p>
  
  <p>I thought about using macros like Autohotkey, but quickly considered it a bad idea.</p>
  
  <p>I don't even know how to call this, but i tried searching for "hook" related stuff, without success.</p>
  
  <p>PS: I'm on a 64 bits Windows 7 system, using Code Blocks. Let me know if there is a better IDE for that, like VS, because i can use it too.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ok, so I caught the information of the window using WinSpy++, though I don't really know what to do with it. I'm trying to get the handle of the child window, but am failing.<br>
  I'm very noob at this. I reminded of an important detail, I need to get the names of the listbox elements and their positions (1st, 2nd, 3rd), is it possible?</p>
  
  <p><strong>EDIT 2 (Where I am)</strong><br>
  Ok, here is where I am so far: I caught the main window handle, but can't get the handle of any of the children. My googling turned up a "GetDlgItem" function, but didn't work. Any ideas?</p>