Mr. P,
in the event handler function, find WM_NCDESTROY and add after it. 'PokeInt WinProcReturn,$0C,PeekInt(WinProcReturn,$00)'
eventsource() will now contain the hwnd pointer to the closed window
kev
in the event handler function, find WM_NCDESTROY and add after it. 'PokeInt WinProcReturn,$0C,PeekInt(WinProcReturn,$00)'
Include "WinBlitz3D_Include.bb" ; create gui window. Global GUIwindow = CreateWindow("Main window",0,0,1024,768,0,0) Global GUIwindow2 = CreateWindow("Secondary window",612,530,400,200,0,0) apiSetParent GUIwindow2,GUIwindow Global Lable = CreateLabel("",0,0,256,25,GUIwindow2) Global listview = CreateListView("listview",30,30,300,150,GUIwindow2,0) ListViewStyle(listview,0) For add_listview_items = 0 To 4 AddListViewColumn(listview,add_listview_items,"Column "+add_listview_items) Next For loop = 0 To 4 For loop1 = 0 To 10 AddListViewItem(listview,loop,loop1,"Column "+loop+" , Item "+loop1) Next Next QUIT = 0 ; loop until user close's window. While QUIT <> 1 events = WaitEvent() Select events Case $803 GadgetSelected = EventSource() Select GadgetSelected Case GUIwindow Notify "window 1" Case GUIwindow2 Notify "window 2" End Select Case $1001 MenuSelected = EventData() Notify "Menu Event, You Selected Menu "+MenuSelected Case $401 GadgetSelected = EventSource() Notify "Gadget Event, Pointer "+GadgetSelected End Select Wend Notify "UnInitializing GUI" End
eventsource() will now contain the hwnd pointer to the closed window
kev