Spy++ or Windows Api Functions not locating controls on child window
Posted on 2010-04-02
I'm trying to write a console application in C# to manipulate another 3rd party Windows application our company uses (written in FoxPro). I'm not seeing all controls on a child page with spy++ or through C# code calling Windows API functions such as FindWindowByIndex() method. Are their some Windows programs that hide controls or that are just written in such a way that they're not accessible, or are their other ways to find them programmatically? My code (using the above and other methods like FindWindow(), FindWindowEx(), etc.) is locating ONLY the same windows/controls that spy++ can see. The window I need to manipulate contains some 50 check boxes, buttons, panels, etc., though Spy++ shows only a few 'next' windows that contain a few dead-end child windows. If I place the finder tool over that windows controls - nothing changes!
Please clue me in on anything (tools, code, shrink, ...) you can think of to find these controls or any info on what may cause these not to show up. I need to know when it's time to stop trying if this is really not possible. Thanks!