Basic Win32 framework of a program
I''m fairly new to windows programming, but I''m not bad in general. I''m just wondering how you guys handle the parts that are always there, ie the message loop, and parts that are pretty much the same with all your projects. I know how it works, I''m just wondering what are some good ways to handle it. Have everything in classes? Make a library and a header? Just copy and paste or use some kind of template? Any responses would be welcome.
I usually either have a file called blankOGLApp.cpp or blankD3DApp.cpp, which contains the WinMain functions with everything it needs for a basic program. I also have window.cpp | h, where I have a class that creates the window and everything in the constructor and has a function called EnterMessageLoop that handles the message loop. The EnterMessageLoop function takes function pointers for the user-defined update and render functions.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement