How can I retrieve this information from the Call back function?SetWindowCallback(@ProcedureName() [, #Window])
Code: Select all
Procedure WinCallback(hWnd, uMsg, wParam, lParam)
debug str(#Window) ; <----------------------------------- ERROR
If uMsg = #WM_SIZE
Select wParam
Case #SIZE_MINIMIZED
Debug "Window was minimized"
Case #SIZE_RESTORED
Debug "Window was restored"
Case #SIZE_MAXIMIZED
Debug "Window was maximized"
EndSelect
EndIf
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(123, 0, 0, 200, 100, "Messages", #PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget)
SetWindowCallback(@WinCallback(),123) ; activate the callback
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf