I am not an expert in FWH. Correct me, if I am wrong
Is there any solution to get a list of open windows/dialogs in a particular application.
There are many situations where when one would require to have such a list while programming in an MDI environment.
Eg. No 1: In my application (MDI enviornment), there is a menu option named "Change working Financial Year", so that my user can change working Financial year. When the user selects this option, I should confirm that no other windows are remaining open in my application.
Eg. No 2: Data Re-indexing option, there should NOT be any open windows (DBF) when the user do the Re-indexing process. Here also I should be able to check whether there are any open windows/dialogs
At present I am handling the above situations by using an Application Class and I am keeping an array DATA in it.
Whenever I create a new Window or Dialog I add few informations to this array and whenever I close the Window/Dialog, I delete the information from the array
Some of the details stored in this array are:-
1. Type ie Window or Dialog
2. Title of the Window/Dialog
3. hWnd of the Window/Dialog
I make use of this class to solve the above said Issues
For Eg.
- Code: Select all Expand view RUN
nOpenWindCount:=Len(oApp:aOpenForms)
If I want to close a particular Window/Dialog, I can loop through the array and get the Window/Dialog Tile and then close.
But if I ever miss to Add or Delete information to this Array in the Application class, then I get undesirable results.
Regards
Anser