Kbase P10913: How to simulate MDI applications using the ADM2
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/23/2003 |
|
Status: Unverified
GOAL:
How to simulate MDI applications using ADM2
FACT(s) (Environment):
Progress 9.x
FIX:
Progress does not support MDI application but it could be simulated using SmartWindows and SmartFrames.
The following are the steps to create an MDI applications.
1- Create a SmartWindows and a button in it.
2- Add the following code to the CHOOSE button trigger:
DEFINE VARIABLE h_wframe AS HANDLE NO-UNDO.
DEFINE VARIABLE hFrame AS HANDLE NO-UNDO.
RUN constructObject (
INPUT 'wframe.w':U , /*SmartFrame file name*/
INPUT FRAME fMain:HANDLE , /*Parent frame handle*/
INPUT 'HideOnInitnoDisableOnInitnoObjectLayout':U ,
OUTPUT h_wframe ).
RUN repositionObject IN h_wframe ( 1.48 , 48.00 ) NO-ERROR.
RUN initializeObject IN h_wframe.
/*Get the frame handle*/
ASSIGN hFrame = DYNAMIC-FUNCTION('getContainerHandle':U IN h_wframe).
/*Assign the frame title*/
ASSIGN hFrame:TITLE = 'Frame Title'.
3- Create a SmartFrame with the following properties for the Frame:
Title Bar = TRUE
Size To Fit = TRUE
Resizable = TRUE
Movable = TRUE
Selectable = TRUE
4- Save the SmartFrame with the name which will be used in the first parameter in the constructObject procedure used in the step 2
5- The SmartFrame should has a procedure or trigger to close the Frame which will call the destroyObject procedure.
6- The SmartFrame should have the code: SELF:MOVE-TO-TOP(). in its ON 'ENTRY' trigger.
7- Run the Window created in the step 1