CompilerIf (#EVENTDEBUG = 1)
WinName$ = "unknown"
If (WindowID(#Window_MainWindow) = WindowID) : WinName$ = "MainWindow" : EndIf
If ((IsWindow(#Window_MySubWindow) <> 0) And (WindowID(#Window_MySubWindow) = WindowID)) : WinName$ = "SubWindow" : EndIf
Debug WinName$ + " / " + DecodeWindowsMessage(WindowID,Message,wParam,lParam)
CompilerEndIf