John Barrat wrote:
> I want to be able to track the position and size of a 3rd party
> application
> when it is running in on the Windows desktop.
> I guess this can be done through the Windows API, however, some pointers
> or
> examples would be useful.

Use GetWindowRect to get the position and dimensions of a window. See also
GetWindowPlacement.

It expects a window handle. A common way of getting a window handle is to
call the FindWindow function, but then you have to know the class name or
window title, and you're also relying on there being only one window
matching those criteria. EnumWindows will give you every top-level window
to let you do more thorough examination to decide whether it's the one
you're after. (For instance, you could call GetWindowThreadProcessID and
use the process ID to determine which process created the window.)

All those functions are documented on MSDN.

-- 
Rob


_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to