WGL_ARB_MULTISAMPLE question

I’ve almost got this working, but one last bit is evading my understanding.

Basically, I have a valid pixel format from wglChoosePixelFormatARB that supports anti-aliasing and everything else I want. The problem is that SetPixelFormat fails when I pass the value in.

In other words, say we had
int format;
// wglchoosepixel stuff creates valid format
if (!SetPixelFormat(hDC, format, &pfd))
{
// failure
}

The problem is that the SetPixelFormat call always fails, even though I just did the choose a line before, which returned a valid value. Is there another version of SetPixelFormat that must be used somewhere?

I can’t seem to find any demos that do anything other than query the existance of antialiasing. None of them seem to actually set it. Similiarly, the documentation seems to suggest that the SetPixelFormat call should just work.

Thanks for any help.

Also, before it gets mentioned, this is the first SetPixelFormat on the window.

As usual, I figured out the answer almost immediately after I posted. The SetPixelFormat does work, but one minor thing needed to be tweaked.