View Full Version : ChoosePixelFormat() and MDI

07-20-2000, 09:47 AM
i had originally written an opengl program as a SDI, but have to change it to a MDI w/ only a single child window that needs to render opengl......it worked fine before changing to MDI, but now it always returns 0 when i call ChoosePixelFormat() and returns the error 126 -"The specified module could not be found"
any help would be greatly appreciated..thanx

07-20-2000, 10:09 AM
Interesting, never had that.
One idea I have is:
Make sure the CView used in your MDI application has added WS_CLIPCHILDREN | WS_CLIPSIBLINGS as window styles, otherwise OpenGL won't work on this window under MS Windows.

Set it in
BOOL CYourView::PreCreateWindow(CREATESTRUCT &cs)
return CView::PreCreateWindow(cs);

[This message has been edited by Relic (edited 07-20-2000).]