- wxJoystickEvent event(wxEVT_JOY_MOVE, buttons, joystick, 0);
- event.SetPosition(wxPoint(x, y));
- event.SetEventObject(this);
+ wxJoystickEvent event(wxEVT_JOY_MOVE, buttons, joystick, 0);
+ event.SetPosition(wxPoint(x, y));
+ event.SetEventObject(this);
+
+ GetEventHandler()->ProcessEvent(event);
+}
+
+void wxWindow::MSWOnJoyZMove(int joystick, int z, WXUINT flags)
+{
+ int buttons = 0;
+ if (flags & JOY_BUTTON1)
+ buttons |= wxJOY_BUTTON1;
+ if (flags & JOY_BUTTON2)
+ buttons |= wxJOY_BUTTON2;
+ if (flags & JOY_BUTTON3)
+ buttons |= wxJOY_BUTTON3;
+ if (flags & JOY_BUTTON4)
+ buttons |= wxJOY_BUTTON4;
+
+ wxJoystickEvent event(wxEVT_JOY_ZMOVE, buttons, joystick, 0);
+ event.SetZPosition(z);
+ event.SetEventObject(this);
+
+ GetEventHandler()->ProcessEvent(event);
+}
+
+void wxWindow::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control)
+{
+ if (control)
+ {
+ wxWindow *child = wxFindWinFromHandle(control);
+ if ( child )
+ child->MSWOnVScroll(wParam, pos, control);
+ return;
+ }
+
+ wxScrollEvent event;
+ event.SetPosition(pos);
+ event.SetOrientation(wxVERTICAL);
+ event.m_eventObject = this;
+
+ switch ( wParam )
+ {
+ case SB_TOP:
+ event.m_eventType = wxEVT_SCROLL_TOP;
+ break;
+
+ case SB_BOTTOM:
+ event.m_eventType = wxEVT_SCROLL_BOTTOM;
+ break;
+
+ case SB_LINEUP:
+ event.m_eventType = wxEVT_SCROLL_LINEUP;
+ break;
+
+ case SB_LINEDOWN:
+ event.m_eventType = wxEVT_SCROLL_LINEDOWN;
+ break;