EnableExplicit Global ETCallback Procedure EventTypeCallback(Window, Message, wParam, lParam) If Message = #WM_LBUTTONDOWN StatusBarText(1,0,"Linke Maustaste wird gedrückt.",0) ElseIf Message = #WM_LBUTTONUP StatusBarText(1,0,"Linke Maustaste wurde losgelassen.",0) ElseIf Message = #WM_RBUTTONDOWN StatusBarText(1,0,"Rechte Maustaste wird gedrückt.",0) ElseIf Message = #WM_RBUTTONUP StatusBarText(1,0,"Rechte Maustaste wurde losgelassen.",0) ElseIf Message = #WM_MBUTTONDOWN StatusBarText(1,0,"Mittlere Maustaste wird gedrückt.",0) ElseIf Message = #WM_MBUTTONUP StatusBarText(1,0,"Mittlere Maustaste wurde losgelassen.",0) EndIf ProcedureReturn CallWindowProc_(ETCallback, Window, Message, wParam, lParam) EndProcedure If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ButtonGadget(1,10,10,100,20,"Button",0) ;CheckBoxGadget(1,10,10,100,20,"CheckBox",0) ;ProgressBarGadget(1,10,10,100,20,0,100,0) ;OptionGadget(1,10,10,100,20,"Option") If CreateStatusBar(1,WindowID(0)) AddStatusBarField(#PB_Ignore) EndIf ETCallback = SetWindowLongPtr_(GadgetID(1), #GWL_WNDPROC, @EventTypeCallback()) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf