Game Engine Design and Implementation: Episode 4 - Windows Skeleton (Part 2)
In which we go over a few options regarding globally accessible class instances, and come up with a final decision on how we will handle them. Have decided on a static global manager class, we implement that.
Having our new class, we create an instance of our Control Window Class inside, and make it accessible to the rest of the program. We add a couple of function calls, and finally get the main window to appear on screen!
We then do some code cleanup, making everything const correct, removing extraneous constructors and destructors where they are empty (just making them default), and so on to make the code nice and clean.
We then return to our CreateControlWindow function and make it a bit smarter, centering our window on the screen and allowing it to accept width and height parameters rather than using magic numbers.