I am calling a DLL with Blitz3D. The widnow close event does not get caught. I even tried a Window callback, and the callback function never got used. (I had an End command at the beginning of the callback, to test with.)
Global WIN
Global GADGET_KEYS
Global WINDOWCLOSED
Global SVAR.s
ProcedureDLL.l CS_InitProperties(hwnd)
win=OpenWindow(0,0,0,400,300,#PB_Window_TitleBar+#PB_Window_ScreenCentered+#PB_WINDOW_INVISIBLE+#PB_Window_SystemMenu,"Properties")
CreateGadgetList(win)
GADGET_KEYS=StringGadget(#PB_ANY,0,0,400,300,"",#PB_String_Multiline)
CloseGadgetList()
ProcedureReturn win
EndProcedure
ProcedureDLL.l CS_Properties(keys$)
WINDOWCLOSED=0
SetGadgetText(GADGET_KEYS,keys$)
HideWindow(0,0)
Repeat
eventid=WaitWindowEvent()
Select eventid
Case #PB_Event_CloseWindow
WINDOWCLOSED=1
EndSelect
Delay(1)
Until WINDOWCLOSED=1
SVAR.s=GetGadgetText(GADGET_KEYS)
HideWindow(0,1)
ProcedureReturn @SVAR
EndProcedure
Not catching window close in DLL
Now here is where it gets interesting.
I am using two near-identical DLL's for different dialogue windows. Both are about the same as the above code, and I even added a CloseGadgetList() to try to fix things.
The FIRST DLL that gets initialized, the InitProperties() or whatever command, works perfectly. The SECOND dll that gets the window initialized does not return events!
I am using two near-identical DLL's for different dialogue windows. Both are about the same as the above code, and I even added a CloseGadgetList() to try to fix things.
The FIRST DLL that gets initialized, the InitProperties() or whatever command, works perfectly. The SECOND dll that gets the window initialized does not return events!
