how to determine the location of the window of other application (not Matlab) and its size?

I do recognition system and I need to decide the location of objects read. So for me the important question of determining the location of the window of a third-party applications, and its size. Thanks!

6 Comments

We need to know your operating system manufacturer and version.
and if it is Linux which WM and DE you are using...
If you have a multi-monitor setup, do you want absolute or relative positions? What about a virtual screen manager? Do you know the window handle of the wanted applications?
windows - my OS. I have one monitor setup. I know name of the wanted application.
Is that Windows 98SE, or Windows Vista Pro Edition ?

Sign in to comment.

 Accepted Answer

Looks to me as if you may need to drop into a mex function. Use the MS Windows function EnumWindows with a callback; the callback will be called once for each top level MS Windows window. The callback would (somehow) figure out whether it was dealing with the desired window or not. Then you can call the MS Windows function GetWindowPlacement to determine the window screen position.
There is no MATLAB routine for this purpose.
There is a possibility that you might be able to find an existing ActiveX control that was able to return the information.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!