>>The problem here would be that FindWindow doesn't work for child windows. The >main window handle is returned by MainhWnd(). For child windows, however, Ed's >suggestion is the simplest.
>
>You're right, but the FindWindowEx function does search for child windows once you have the parent handle.
>
>I only presented the alternative because some folks, myself included, would rather use the API and not Foxtools.
>
>I didn't even know those functions were in Foxtools. <g>
>
>Donald
I use Foxtools a lot, in fact it's always loaded by my appliations, since it provides a lot of functionality in dealing with files, paths and drives. Since it is, and a very direct way of retrieving the window handle exists, I prefer to use it when I can.
From what I've understood from the threads from last year's DevCon, some of the functions from Foxtools are going to become part of the language. If you're interested, there's a fully cross-referenced help file available in the download section (Coding, Syntax & Commands).
Quick question. FindWindowEx() requires the class name of the window be passed. The documentation, however, doesn't mention whether or not in can be NULL, so I assume that it can't be. Now getting the class name of the main VFP window isn't a problem. However, I've noted (using Spy++) that not all the class names of the windows match the parent. Admittedly, I haven't researched this very carefully. So the questions are: Can the class name be NULL, and if not, are all the form's class names the same as the parent?
TIA,
George
Ubi caritas et amor, deus ibi est