wglMakeCurrent failed!!

I made my render window in MFC. In OnTimer i call my renderscene() which has the following code at its beginning:
CDC *pDC=GetDC();
BOOL bResult = wglMakeCurrent (pDC->m_hDC, m_hGLContext);
if (!bResult)
TRACE("wglMakeCurrent Failed %x
", GetLastError() ) ;


there is no problem with wglMakeCurrent.

BUT i also need to call renderscene() when i want to select object. If this occurs wglMakeCurrent fails even (after found this)i tried to add some logic to prevent conflict(calling it before it finishs).

This didn’t happen on my old PC(win98), now it’s win 2000.
I shall be very happy if anyone has an idea.

Well, now i come up with more informatiom:
I found it is glRenderMode(GL_SELECT) in my selection function that makes wglMakeCurrent fails, how? please help, many Thanks

[This message has been edited by beginner620824 (edited 07-30-2003).]

Do you use more than 1 RC? If not, I don’t see why you would need to make your context current more than once.