#pragma region Public Domain Code /* This code is in the public domain. You can do whatever you want with it, change it, appropriate it, relicense it, redistribute it, include it in your own libraries and applications, sell it and never mention where you've got it. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma endregion // Public Domain Code #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include #include "Demo.h" using namespace Nuclex::Graphics::Demo; // --------------------------------------------------------------------------------------------- // /// Main entry point for the application /// Instance handle of the new process /// Instance handle of the previous process /// arguments provided to the application on the command line /// Desired initial state of the application's window /// Zero on success int WINAPI WinMain( HINSTANCE instanceHandle, HINSTANCE previousInstanceHandle, LPSTR commandLine, int showWindow ) { UNREFERENCED_PARAMETER(previousInstanceHandle); // Avoid warning on /W4 UNREFERENCED_PARAMETER(commandLine); // Avoid warning on /W4 UNREFERENCED_PARAMETER(showWindow); // Avoid warning on /W4 Demo demo(instanceHandle); // Run the message loop. When the user tries to close the window by clicking // on 'X' or pressing Alt+F4, your game is informed via WasCloseRequested() // and can perform an orderly shutdown. while(!demo.WasQuitRequested()) { MSG message; while(::PeekMessage(&message, NULL, 0, 0, PM_REMOVE)) { if(message.message == WM_QUIT) { return static_cast(message.wParam); } ::TranslateMessage(&message); ::DispatchMessage(&message); } demo.Draw(); } // As the window goes out of scope, it gets destroyed and everything will // be cleaned up. return 0; } // --------------------------------------------------------------------------------------------- //