Jump to content
  • Advertisement
Sign in to follow this  
stringa

MFC and DirectX ... How can I create a Render Loop () ...

This topic is 3761 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

Normally in Win32, I would override GetMessage with PeakMessage and run a render() right after DispatchMessage(). How can I do that with MFC? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Been a while since I did any MFC but if I remember correctly you implement the OnIdle() method in your App (or Doc or View, not sure which) and stick your rendering loop in there. OnIdle should get called whenever there is spare CPU time available, so should work pretty much all the time ;)

Share this post


Link to post
Share on other sites
The answer :)

Look at the date I wrote that article, though. Long time ago. MFC is all but dead now. If you're developing a tool and need to implement a user interface, go with C# (you can still use "unsafe" C++ code with C#, btw).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!