by robmar » Fri Mar 09, 2012 11:13 am
Thanks for the info, and yes you´re right, device->Run does call PeekMessage, and then checks for an external window, etc., so I guess maybe that call is required.
One annoying problem I have yet to solve is that if I use the opengl driver (on Win7), my MFC application hangs up on closing the View, for some reason between exiting OnDestroy there is a 5 second delay before the MFC framework calls the document destructor. Why should the opengl driver cause the MFC framework to perform differently to the D3D driver? I´ve stepped thro MFC, but whatever is happening is in Microsoft´s core code which I don´t have source for. Under D3D with identical meshes etc., the view closes instantly, but if I switch the device to opengl, MFC get hung for 5+ seconds on closing the view. My code closes and deletes the device in the standard manner, and that works perfectly, but for some frustrating and still obscure reason, the MFC framework hangs, originating from the PostMessage issued by MFC after the user clicks the "X" to close the view, that starts the close sequence.
What difference could using OpenGL make to MFC?