| Quick note to all people using the new Win32MaxGUIEx: This code works the same with the new module:
 
 
Import MaxGUI.Win32MaxGUI
Local MainWindow:TGadget = CreateWindow:TGadget("MainWindow",272,149,365,193,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_STATUS |WINDOW_CLIENTCOORDS )
	Local ChildWindow:TGadget = CreateWindow:TGadget("ChildWindow",243,71,99,105,MainWindow:TGadget,WINDOW_TITLEBAR|WINDOW_TOOL |WINDOW_CHILD)
Repeat
	WaitEvent()
	Select EventID()
		Case EVENT_WINDOWCLOSE
			Select EventSource()
				Case MainWindow	MainWindow_WC( MainWindow:TGadget )
				Case ChildWindow	ChildWindow_WC( ChildWindow:TGadget )
			End Select
	End Select
Forever
Function MainWindow_WC( Window:TGadget )
	DebugLog "Window MainWindow wants to be closed"
	End
End Function
Function ChildWindow_WC( Window:TGadget )
	DebugLog "Window ChildWindow wants to be closed"
	End
End Function
 
 |