I’m getting handle leaks and Dev. Studio messages about exceptions from ChoosePixelFormat, SetPixelFormat, etc. from a web launched ATL server.
The same OpenGL code works in an ActiveX control, and also when hosted by a windowed desktop application but I want to output the images to web pages too.
The same CreateWindow call is shared between the working desktop app and the failing web server, so the only cause for this must be that the web server’s window is parented by the Anonymous user’s desktop window.
So far I’ve:
- Tried using an MFC window that overrides PreCreateWindow to set CS_OWNDC | WS_CLIPCHILDREN | WS_CLIPSIBLINGS as described in the FAQ on this site.
- Tried various window styles WS_POPUP, WS_CHILD, and WS_OVERLAPPED.
- Tried various pixel formats and discovered that the problem will show itself with just a call to GetPixelFormat before anything else.
Has anyone encountered this problem and/or worked around it? So far only my Matrox G400 Millenium card is affected. I’m using an Nvidia2 card that works fine.