Thanks Johan!
I made a couple of changes because it doesn't seem to show the minimize box, restore and close button if your game runs on full screen initially.
Line 18 should be changed to:
nStyle |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
How to toggle between windowed and full screen mode