-
GDI32.dll: Access violation
In windows 98 SE. I create "fullscreen" window with WS_EX_APPWINDOW flag. Then I choose pixel format and create OpenGL context. After window is closed I release OGL context. Very often I 1-1000 access violations in GDI32.dll. I even download some examples from internet and they operate the same way and I get the same bug. What I do wrong?
I used GeForce FX and Radeon 9600XT video cards. And the last drivers.
-
Re: GDI32.dll: Access violation
This might best stands in the Windows specific forum.
-
Re: GDI32.dll: Access violation
You should release your GL context and the device context (hdc) before calling DestroyWindow.
Your windows class should have the CS_OWNDC style. This way you can get the device context once, immediately after creating the windows, and keep it around until you close it.
Order matters. Initialization:
1)CreateWindow(Ex)
2)GetDC
3)ChoosePixelFormat, SetPixelFormat
4)wglCreateContext
5)wglMakeCurrent
Shutdown:
1)wglMakeCurrent(0,0)
2)wglDeleteContext
3)ReleaseDC
4)DestroyWindow
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules