Multiple Window Applications
- Aktualisiert2025-07-23
- 2 Minute(n) Lesezeit
A multiple window application includes at least one window that always exists to contain the Application Manager control. Although this window can be visible or invisible, it is typically visible and contains controls for users to open sequence files.
Sequence File Window
For each sequence file users open, the application creates a Sequence File window that contains a SequenceFileView Manager control and a SequenceView control to which the manager control connects. The application sets the SequenceFileViewMgr.UserData property to attach a handle, reference, or pointer that represents the window. When the application receives the ApplicationMgr.DisplaySequenceFile event, the application calls ApplicationMgr.GetSequenceFileViewMgr to determine whether a SequenceFileView Manager control currently displays the sequence file. If so, the application retrieves the window from the SequenceFileViewMgr.UserData property and activates the window. If no window currently displays the sequence file, the application creates a new window and sets the SequenceFileViewMgr.SequenceFile property to display the sequence file. Because the window displays only this sequence file, the application also sets the SequenceFileViewMgr.ReplaceSequenceFileOnClose property to False.
When a Sequence File window attempts to close and the SequenceFileViewMgr.SequenceFile property is NULL, the application closes the window immediately. When the SequenceFileViewMgr.SequenceFile property is not NULL, the application does not close the window. Instead, the application passes the sequence file to the ApplicationMgr.CloseSequenceFile method. When the application receives the SequenceFileViewMgr.SequenceFileChanged event with a NULL sequence file event parameter, the application closes the window that holds the SequenceFileView Manager control.
Execution Window
The Sequence File window contains controls for users to execute the sequence file the window displays. For each execution users start, the application creates an Execution window that contains an ExecutionView Manager control and a SequenceView control to which the manager control connects. The application sets the ExecutionViewMgr.UserData property to attach a handle, reference, or pointer that represents the window. When the application receives the ApplicationMgr.DisplayExecution event, the application calls the ApplicationMgr.GetExecutionViewMgr method to determine whether an ExecutionView Manager control currently displays the execution. If so, the application retrieves the window from the ExecutionViewMgr.UserData property and activates the window. If no window currently displays the execution, the application creates a new window and sets the ExecutionViewMgr.Execution property to display the execution. Because the window displays only this execution, the application also sets the ExecutionViewMgr.ReplaceExecutionOnClose property to False.
When an Execution window attempts to close and the ExecutionViewMgr.Execution property is NULL, the application closes the window immediately. When the ExecutionViewMgr.Execution property is not NULL, the application does not close the window. Instead, the application passes the execution to the ApplicationMgr.CloseExecution method. The application does not immediately close the Execution window to ensure that the window exists until the execution the window displays completes. When the application receives the ExecutionViewMgr.ExecutionChanged event with a NULL execution event parameter, the application closes the window that holds the ExecutionView Manager control.
Child Windows
A multiple window application can display multiple child windows instead of displaying sequence files and executions in separate top-level windows. Child windows can be visible or reside on tab control pages or similar locations that allow users to easily select which child window to view.