Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ivko

Basic Win32 framework of a program

This topic is 6064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!