SetPixelFormat crash (multisampling)

In order to get multisampling working, one first needs to create a window and GL context before being able to detect the extension.

But do I have to destroy the window and create a new one? I tried to re-use the window (while destroying and re-creating everything else with the new pixelformat), but my program crashes on the SetPixelFormat call. I’m wondering in what way is the window ‘changed’ so that I can’t re-use it again…?

Please read the documentation of the SetPixelFormat. It states clearly that it may be called only once per window.

Sorry, you are correct. It is due to “significant complications for the Window Manager and for multithread applications”. I must have missed that part of the docs. Link for the lazy (like me): http://msdn2.microsoft.com/en-us/library/ms537559(VS.85).aspx