For the time being, at least add a sleep(0). This will still run your CPU at 100%, but it will reliquish your time-slice if something else needs to do some work. You could also take the mutlithreaded approach, and use GetMessage in the pump and a seperate thread for the game.
You don''t want to add a sleep(10), because they introduces artifical latency in your message handling.
quote:
You have a realtime message loop
There''s no such thing as a real-time anything with windows. You know how they have those API calls to set the process and thread priorities to ''real-time''? Yeah, they''re just kidding. Windows was designed to make office applications, not send rockets to moon
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara