Archived

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

D3D IM and MFC

This topic is 6358 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''ve got D3D IM running in a Appwizard generated MDI app... it works fine, closes fine, but when I try to close the current view, and open an new View Window, I get access violations. I haven''t changed anything in the Doc class, most all of the code is in the View class I init d3d in CView''s OnInitialUpdate() function. I shutdown d3d in CView''s OnDestroy() function. All rendering is done in CView''s OnUpdate function. Anyone have any ideas?

Share this post


Link to post
Share on other sites
Hmm. Are you calling the default OnDestroy() when you''re done? One thing many people forget is that a lot of stuff goes on in these calls, and if you don''t do the normal logic with it you can wind up with a semi-destroyed window and a lot of odd behaviour.

Other places to shutdown you might try would be an OnClose override or in the destructor of the view.

If this doesn''t help tell me. I don''t usually check this forum so e-mail or icq works (I''m only here because I saw your note in mine...)

-fel

Share this post


Link to post
Share on other sites