Test implementation in https://github.com/hrydgard/fullscreen-test
Just open the MSVC project file and build.