Window system handles
- Last Updated: April 30, 2024
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The simple examples in this book that do not use a window you create (or that is created for
you in code the AppBuilder generates) use the default window that is part of every
session. This has a system handle called DEFAULT-WINDOW. This handle is
not something you would ordinarily use in a real application.
You saw the CURRENT-WINDOW system handle, which holds the handle of the
window used by default for parenting frames, dialog boxes, and message alert boxes. The
CURRENT-WINDOW attribute of a procedure overrides
CURRENT-WINDOW for the context of that procedure only, without
changing the value of the session-wide system handle. The statements in the standard
AppBuilder window template that set both CURRENT-WINDOW and the
CURRENT-WINDOW procedure attribute to the procedure’s window
provide a good default for parenting of objects created and used in that procedure.
Another useful system handle is ACTIVE-WINDOW, which holds the handle of
the window that has received the most recent input focus in the application. This handle
can help you assure that a dialog box or message alert box appears parented to the
window where the user is currently working, even if it is not the current window of the
procedure that executes the code to display the dialog box or message.