This should be doable. It should be possible to pull the message loop out of here and place it in another file, like Window.h which is already responsible for processing messages, and make the file OS-Unaware. I want to limit OS-Aware code where possible.