I'm searching for the best Game layout using windows. Currently I haven't found a layout that enables me to do everything I need(Rendering different things and handling different stuff at different times) while maintaing the windows message procedure. I need to be able to handle and receive messages constantly, so I can't have any real while loops inside of the windows main while loop, or it crashes.
I was thinking of having a switch statement inside of the main while loop with variables that handle different parts of my games.(Opening Menu, Level rendering, Credit Rendering etc..). If anyone could please post their thoughts on the best way to handle windows messages while still having ability to change what's rendered and the variables present constantly.