Skip to main content
GameDev.net gamedev.net
🔒 Locked

Basic Win32 framework of a program

Started by Ivko Dec 12, 2001 at 9:42 PM 0 replies 350+ views
Original Post
Ivko
Ivko
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.
masonium
masonium
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.