Sign in to follow this  

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

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

This topic is 3574 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this