Kbase P123365: How to use to NORMAL-STATE attribute to restore a window to its previous state?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/04/2007 |
|
Status: Unverified
GOAL:
How to use to NORMAL-STATE attribute to restore a window to its previous state?
GOAL:
How to restore a minimized PERSISTENT Window to its previous state?
GOAL:
How to get the handle of a WINDOW WIDGET from its procedure handle?
FIX:
The following code demonstrates how to restore a window to its previous state(hWidgetWindow:WINDOW-STATE = WINDOW-NORMAL.), how to access the handle of a WINDOW WIDGET from its procedure handle (hWidgetWindow = hWindowA:CURRENT-WINDOW.):
ON CHOOSE OF BUTTON-1 IN FRAME DEFAULT-FRAME /* Button 1 */
DO:
DEFINE VARIABLE cProgramName AS CHARACTER NO-UNDO.
DEFINE VARIABLE hWidgetWindow AS WIDGET-HANDLE NO-UNDO.
ASSIGN
cProgramName = "WindowA.w".
IF VALID-HANDLE(hWindowA) THEN
ASSIGN
hWidgetWindow = hWindowA:CURRENT-WINDOW
hWidgetWindow:WINDOW-STATE = WINDOW-NORMAL.
ELSE
RUN VALUE(cProgramName) PERSISTENT SET hWindowA.
END.