lovespy108
19th November 2007 14:37 UTC
Check application is running or not under the conditon?
A software has professional edition and standard edition.When they are running,they have the same process name.Their application windows have the same class name.
I opened the professional edition and standard edition.I want to update standard edition with my patch.when the patch is running,it will check whether the standard edition is running or not.if it's running,patch will tell user to shut the standard edition.
question:
How to check whether the standard edition is running or not?
********************************************************
I want to use the application window title of professional edition or standard edition,but I don't know how to get the application window title when they are all running at the same time.
question:
How to get application window title when I opened more than one application?
********************************************************
Thanks very much for help!:up: :up:
Joel
19th November 2007 14:45 UTC
I hope that you have some backgrounds on System plugin, here it goes:
1. Since you know the class get the window handle with FindWindow
2. With the window handle, get its title text with GetWindowText.
Good luck.
Afrow UK
19th November 2007 15:03 UTC
You could just use FindWindow and WM_GETTEXT both without using the System plug-in.
Stu
Joel
19th November 2007 15:08 UTC
I love the hard way :)
lovespy108
19th November 2007 23:27 UTC
Professional edition and Standard edition has same class name and has same process name.When they are running at the same time,FindWindow don't know which window will be found.
Joel
20th November 2007 03:03 UTC
Check FindWindow.
There's an example with window title.
lovespy108
22nd November 2007 04:16 UTC
I know how to use FindWindow and can get a application window title if I know its class name.
But I don't know the class name.and two applications have the same process name and I don't know the applications' class names.so FindWindow and FindProc are not useful under this conditions.
So I want to use EnumWindows to enumerate applications windows to get their window handles.Then use FindWindow.
So the problem is transfered to how to use EnumWindows?
Takhir
22nd November 2007 15:17 UTC
While you know how FindWindow works ;) , you can modify FCT plug-in (if it not solves your problem "as it is"). EnumWindows looks simpler for me in C code.
lovespy108
22nd November 2007 23:20 UTC
I solved it
Joel
23rd November 2007 15:23 UTC
Cool!
I made a plugin for enumerate de Window titles.
Just to make life easier :)