I get : System Error: Cannot create a top-level child window.
Lets recap:
//Application's main window - Win_main
DEFINE WINDOW Win_Main FROM 0, 0 TO 600, 800 PIXEL TITLE 'SubsPro' MDI ICON oIcon MENU mainmenu() ON RELEASE quitprog()
//Buttonbar of Win_main
DEFINE BUTTONBAR oMain_Toolbar OF Win_Main SIZE 70, 50 3D
//One of the buttons creates a MDI Child window: Win_Dbmain
DEFINE WINDOW Win_Dbmain TITLE "Subscribers Database" MDICHILD ICON oIcon
//I define its button bar
DEFINE BUTTONBAR oButton_Bar OF Win_Dbmain SIZE 40, 40 3D
//I then define the Dlg - Dlg_Dbmain (it has folders/Tabs)
DEFINE DIALOG Dlg_Dbmain RESOURCE "DBMAIN" OF Win_Dbmain ICON oIcon
//These dlgs and windows are activated as follows (so that they behave "as one"
ACTIVATE DIALOG Dlg_Dbmain NOWAIT ; // It has to be NonModal
ON INIT ( Dlg_Dbmain:Move( 0, 0 ) ) ;
VALID ( Win_Dbmain:End(), .T. )
ACTIVATE WINDOW Win_Dbmain MAXIMIZED ;
ON RESIZE ( WNDSETSIZE( Dlg_Dbmain, WNDHEIGHT( Win_Dbmain ), WNDWIDTH( Win_Dbmain ) ) ) ;
VALID ( IF( save_MAIN_data(), ( close_tables(), Win_Dbmain := NIL, .T. ), .F. ) )
If I remove the line:
DEFINE BUTTONBAR oButton_Bar OF Win_Dbmain SIZE 40, 40 3D
and move it to the line * above
DEFINE BUTTONBAR oButton_Bar OF Dlg_Dbmain SIZE 40, 40 3D
I get : System Error: Cannot create a top-level child window.
I have a better screen shot with annotations that explains it nicely:
http://img120.imageshack.us/my.php?imag ... hotsr5.jpg