demos: Handle paint events and call RedrawWindow to animate
This keeps MessageBoxs from validation on Windows from hanging the
demos, while allowing the demo to animate
diff --git a/demos/cube.c b/demos/cube.c
index a57bf4f..12de7f5 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -1814,7 +1814,7 @@
break;
case WM_PAINT:
demo_run(&demo);
- return 0;
+ break;
default:
break;
}
@@ -2536,6 +2536,7 @@
TranslateMessage(&msg);
DispatchMessage(&msg);
}
+ RedrawWindow(demo.window, NULL, NULL, RDW_INTERNALPAINT);
}
demo_cleanup(&demo);