CartoonJon
asked on
Locating response windows
Here is the situation...
The application has frame window. This frame window has an instance of a custom user object and that object has a function. That function has one argument passed into it, a window argument passed by value. That window would be the frame window. In the function I need to search through all the open windows in the application to find the one that matches the name of a window pulled from a database. Unfortunately this application has a few windows that are opened as response windows instead of sheets in the frame. I need to be able to find these windows too, but I cannot do it with just the GetFirstSheet() and GetNextSheet() functions.
Does anyone have any suggestions?
Thanks in advance
CartoonJon
The application has frame window. This frame window has an instance of a custom user object and that object has a function. That function has one argument passed into it, a window argument passed by value. That window would be the frame window. In the function I need to search through all the open windows in the application to find the one that matches the name of a window pulled from a database. Unfortunately this application has a few windows that are opened as response windows instead of sheets in the frame. I need to be able to find these windows too, but I cannot do it with just the GetFirstSheet() and GetNextSheet() functions.
Does anyone have any suggestions?
Thanks in advance
CartoonJon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Actually an array of windows won't add much if any strain to your resources. The array elements are just reference variables, so they only hold the address of the window not the entire window. Basically it is the equivalent to having an array of longs, as far as memory is concerned. I can't think of a more efficient way to accomplish your task. Also, while there are a ton of windows in your application it's unlikely that a user would have more than 10 open at a time. If you code the function that populates the array properly, the array will never be bigger than the maximum number of windows the user opens during a session.
ASKER
Thanks a bunch.
Actually an array of windows won't add much if any strain to your resources. The array elements are just reference variables, so they only hold the address of the window not the entire window. Basically it is the equivalent to having an array of longs, as far as memory is concerned. I can't think of a more efficient way to accomplish your task. Also, while there are a ton of windows in your application it's unlikely that a user would have more than 10 open at a time. If you code the function that populates the array properly, the array will never be bigger than the maximum number of windows the user opens during a session.
ASKER