Archived

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

AntiVeggieBoy

D3D with MFC - again

Recommended Posts

AntiVeggieBoy    122
Here we go again - I have the same problem I had earlier with my D3D window not closing properly. I have an MFC app (SDI) that has a global pointer to a Dialog called CFullscreenDialog. The dialog is created and initialized on app startup and then hidden using ShowWindow(), when the user chooses to run the renderer in fullscreen mode, the window is shown, D3D is started and my D3D wrapper is given the HWND of the dialog using GetSafeHwnd(). Everything works great, rendering is fine, direct input works with the window and everything, but, when I press escape (this disconnects the client portion of my app) the code is run to shut down D3D and close the window. The dialog is definitely closed (I delete the pointer to it - I assume the destructor is called (is it?) ) and then I call my D3D wrappers shutdown method, which seems to execute everything, releasing all meshes, textures, the Device and then D3D itself (as confirmed in log file). Problem is , the last rendered image stays on the screen and I can click in the top-right of the screen to eventually close the app's main window - but only if the fullscreen resolution was equal to the desktop res. There are no mem leaks as reported by VC++. HELP ME!!! btw, is calling Release on COM objects meant to NULL the pointer called? Thanks Chris [edited by - AntiVeggieBoy on October 9, 2003 4:03:32 PM]

Share this post


Link to post
Share on other sites