Ola!
Até onde sei na Hwgui tem a janela principal e vc pode optar por abrir dialogs, modais ou não e janelas filhas que são abertas debaixo/dentro da principal. Os dialogs são livres.
// Every HwGUI application must include hwgui.ch header file
#include "hwgui.ch"
Function Test
Local oMain
// Most of GUI applications creates the main window:
INIT WINDOW oMain MAIN TITLE "My First HwGUI sample" AT 100, 100 SIZE 400, 300
/* Here you can place definitions of menu and window controls
* Then the window must be activated - it appears on the screen
* and the application goes to the main loop of handling messages.
*/
ACTIVATE WINDOW oMain
Return Nil
Dialogs!
/* A dialog box is a temporary window an application creates to
get user input. An application typically uses dialog boxes to prompt the user
for some information. A dialog box usually contains one or more controls,
with which the user enters text and chooses options.
A modal dialog box becomes active after creation and neither the
user nor the application can make the owner window active until this dialog
box is destroyed. */
#include "hwgui.ch"
Function Test
Local oDlg, oFont, oEdit1
PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13
INIT DIALOG oDlg TITLE "Modal dialog" AT 100, 100 SIZE 300, 150 FONT oFont
@ 100,100 BUTTON "Close" SIZE 100,30 ;
ON CLICK {|| oDlg:Close() }
ACTIVATE DIALOG oDlg
Return Nil
Não modal/Livre
// Modeless dialog doesn't prevent any other window to become active.
#include "hwgui.ch"
Function Test
Local oDlg, oFont, oEdit1
PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13
INIT DIALOG oDlg TITLE "Modeless dialog" AT 100, 100 SIZE 300, 150 FONT oFont
@ 20,20 SAY "Input: " SIZE 60, 24
// The ON SIZE clause in EDITBOX definition handles the control's
// behaviour while the parent window resizing. More details will be later.
@ 80,20 EDITBOX oEdit1 CAPTION "" SIZE 200,26 ;
ON SIZE ANCHOR_LEFTABS + ANCHOR_RIGHTABS
@ 100,100 BUTTON "Close" SIZE 100,30 ;
ON CLICK {|| hwg_MsgInfo( oEdit1:value, "Edit value" ), oDlg:Close() }
// You see, we add here a magic word NOMODAL
ACTIVATE DIALOG oDlg NOMODAL
Return Nil
E tem a MDI.
INIT WINDOW oMainWindow MDI TITLE "Example" SIZE 800,500 ;
MENUPOS 3 BACKCOLOR 16744703
...
INIT WINDOW oChildWnd MDICHILD TITLE "Child" STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW
Fica dentro da outra, não uso assim, uso dialog.
Verifique na pasta samples a.pŕg que tem o código completo.
Saudações,
Itamar M. Lins Jr.