This is bug fix for scintilla window version. it handles the autoclose event.
Code: Select all
Procedure SciMousePanCallBack(Result,WindowID, Message, wParam, lParam)
If result= #PB_ProcessPureBasicEvents
If Message=#WM_PARENTNOTIFY And PeekW(@wParam)=#WM_MBUTTONDOWN
Shared SciMousePan
SciMousePan=1
EndIf
EndIf
ProcedureReturn Result
EndProcedure
Procedure SciMousePanEnd()
Shared SciMousePan
If SciMousePan
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
EndProcedure
Procedure MyWindowCallback(WindowID, Message, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
Result = SciMousePanCallBack(Result,WindowID, Message, wParam, lParam)
;
; your code
;
ProcedureReturn Result
EndProcedure
SetWindowCallback(@MyWindowCallback())
Repeat
SciMousePanEnd()
eventID = WaitWindowEvent()
Select eventID
Case #PB_Event_CloseWindow
EndSelect
Until eventID=#PB_Event_CloseWindow