Add window support

Hi Tim,

Here is the pull request of the open window (and change in de demo project with an example for a settings window). It is based on the latest commit from you (couple of hours ago).

Cheers,
Luuk