]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/joytest/joytest.cpp
refresh the dialog children forcefully even if wxCLIP_CHILDREN was specified
[wxWidgets.git] / samples / joytest / joytest.cpp
index 7298b2f286e8e6db0e249f4e8db72034da9f7cd4..189314b3a8948c81c78ece5a2548066d809aebd9 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wx.h"
 #endif
 
-#include <wx/wave.h>
-#include <wx/joystick.h>
+#if !wxUSE_JOYSTICK
+#error You must set wxUSE_JOYSTICK to 1 in setup.h!
+#endif
+
+#include "wx/wave.h"
+#include "wx/joystick.h"
 
 #include "joytest.h"
 
@@ -90,7 +94,7 @@ bool MyApp::OnInit(void)
 }
 
 BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
-       EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
+    EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
 END_EVENT_TABLE()
 
 // Define a constructor for my canvas
@@ -130,9 +134,9 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event)
 
   char buf[100];
   if (event.ButtonDown())
-    sprintf(buf, "Joystick (%ld, %ld) Fire!", pt.x, pt.y);
+    sprintf(buf, "Joystick (%d, %d) Fire!", pt.x, pt.y);
   else
-    sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y);
+    sprintf(buf, "Joystick (%d, %d)", pt.x, pt.y);
   frame->SetStatusText(buf);
 
 #if wxUSE_WAVE