Jump to content
  • Advertisement

Archived

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

Prairie

quick MFC/DirectX Question

This topic is 6245 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 have a class derived from a view class. With-in the OnCreate() handler I call my initialization for directx. This fails to create the device, and I realize that it''s due to the window not being created (if I call the function on a mouse click (after the view is created) it works like a charm). My question is, how do I get around this? Where should I call my Init function? Thanks in advance. Prairie

Share this post


Link to post
Share on other sites
Advertisement
Try yout InitInstance() function. You''re actually suppoised to put intialization code in there. Instantiating DirectX during OnCreate() is analogous to creating the device in response to a WM_CREATE message - a general no-no.

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!