List of ALL possible events(?)
Posted: Sun Jun 06, 2004 8:51 pm
Its seems PB is missing a few entries in it's docs for the events which WaitWindowEvent() and WindowEvent can spit out.
I think I have managed to unearth the main PB_ ones:
There are also tons of Windows events ...
Almost ALL events are covered here but I still need to complete the collection.
Run the above example to see what I mean.
You'll see a few hex numbers pop up but I don't know WHAT event they relate to.
Any way of finding out?
I think I have managed to unearth the main PB_ ones:
Code: Select all
ev=WaitWindowEvent() / ev=WindowEvent()
#PB_Event_ActivateWindow = $6
#PB_Event_CloseWindow = $10
#PB_Event_Gadget = $332C
#PB_Event_Menu = $332D
#PB_Event_MoveWindow = $3
#PB_Event_Repaint = $F
#PB_Event_SizeWindow = $5
#PB_Event_SysTray = $332E
et=EventType()
#PB_EventType_Change = $300
#PB_EventType_CloseItem = $FFFF
#PB_EventType_Focus = $100
#PB_EventType_LeftClick = $0
#PB_EventType_LeftDoubleClick = $2
#PB_EventType_LostFocus = $200
#PB_EventType_ReturnKey = $501
#PB_EventType_RightClick = $1
#PB_EventType_RightDoubleClick = $3
#PB_EventType_SizeItem = $FFFECode: Select all
#WM_MOUSEWHEEL=$20A
#WM_MOUSELEAVE=$2A3
#WM_MOUSEHOVER=$2A1
Procedure MyWindowCallback(WindowID, Message, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
Select Message
Case #WM_LBUTTONUP : Debug "mouse LMB up"
Case #WM_LBUTTONDOWN : Debug "mouse LMB down"
Case #WM_RBUTTONUP : Debug "mouse RMB up"
Case #WM_RBUTTONDOWN : Debug "mouse RMB down"
Case #WM_MBUTTONUP : Debug "mouse MMB up"
Case #WM_MBUTTONDOWN : Debug "mouse MMB down"
Case #WM_LBUTTONDBLCLK : Debug "mouse LMB double-click"
Case #WM_RBUTTONDBLCLK : Debug "mouse RMB double-click"
Case #WM_MBUTTONDBLCLK : Debug "mouse MMB double-click"
Case #WM_MOUSEWHEEL : Debug "mouse wheel"
Case #WM_MOUSEMOVE : Debug "mouse move"
Case #WM_MOUSELEAVE : Debug "mouse leave"
Case #WM_MOUSELAST : Debug "mouse last"
Case #WM_MOUSEHOVER : Debug "mouse hover"
Case #WM_MOUSEFIRST : Debug "mouse first"
Case #WM_MOUSEACTIVATE : Debug "mouse activate"
Case #WM_NCMOUSEMOVE : Debug "NC mouse move"
Case #WM_NCLBUTTONDOWN : Debug "NC mouse LMB"
Case #WM_KEYDOWN : Debug "key down"
Case #WM_KEYUP : Debug "key UP"
Case #WM_CHAR : Debug "char"
Case #WM_PAINT : Debug "win paint"
Case #WM_MOVING : Debug "win moving"
Case #WM_SIZING : Debug "win sizing"
Case #WM_MOVE : Debug "win moved"
Case #WM_CLOSE : Debug "win closed"
Case #WM_GETMINMAXINFO : Debug "win sized"
Case #WM_WINDOWPOSCHANGING : Debug "win pos changing"
Case #WM_WINDOWPOSCHANGED : Debug "win pos changed"
Case #WM_SETCURSOR : Debug "set cursor"
Case #WM_NCHITTEST : Debug "NC hit test"
Case #WM_CTLCOLORBTN : Debug "ctl color button"
Case #WM_COMMAND : Debug "wm command"
Case #WM_CONTEXTMENU : Debug "context menu"
Case #WM_PARENTNOTIFY : Debug "parent notify"
Case #WM_ACTIVATE : Debug "activate"
Case #WM_NCACTIVATE : Debug "NC activate"
Case #WM_ACTIVATEAPP : Debug "activate app"
Case #WM_KILLFOCUS : Debug "kill focus"
Case #WM_GETICON : Debug "get icon"
Case #WM_SYSCOMMAND : Debug "sys command"
Case #WM_DESTROY : Debug "destroy"
Case #WM_NCDESTROY : Debug "NC destroy"
Default : Debug ">> &H"+Hex(Message)
EndSelect
ProcedureReturn Result
EndProcedure
Quit = #FALSE
If OpenWindow(0, 162, 380, 268, 69, #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_SizeGadget, "event monitor")
AddKeyboardShortcut(0, #PB_Shortcut_Escape, #PB_Shortcut_Escape)
If CreateStatusBar(1,WindowID())
EndIf
If CreateGadgetList(WindowID())
ButtonGadget(0,10,10,46,20,"test")
EndIf
EndIf
SetWindowCallback(@MyWindowCallback())
Repeat
ev = WaitWindowEvent()
count=count+1
StatusBarText(1,0,"Count="+Str(count)+" Event = $"+Hex(ev))
Select ev
Case #PB_Event_CloseWindow
Quit = #TRUE
Case #PB_Event_Menu
Select EventMenuID()
Case #PB_Shortcut_Escape
Quit = #TRUE
EndSelect
EndSelect
Until Quit
EndRun the above example to see what I mean.
You'll see a few hex numbers pop up but I don't know WHAT event they relate to.
Any way of finding out?