   [C++/CLI] wglMakeCurrent fails after inactivity
  I use a C++/CLI dll to work with OpenGL and a C# Gui. As a viewport I use a simple user control and handle its events in the dll. When initializing OpenGL I do it like that:(ViewportControl is a user control)_hWnd = (HWND)ViewportControl->Handle.ToPointer();_hDC = GetDC(_hWnd);then I use the common way of initializing opengl:PIXELFORMATDESCRIPTOR pfd = {sizeof(PIXELFORMATDESCRIPTOR),1,PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER | PFD_GENERIC_ACCELERATED | PFD_TYPE_RGBA,GetDeviceCaps(this->_hDC, BITSPIXEL),0, 0, 0, 0, 0, 0,0, 0,0, 0, 0, 0, 0, 32, 0,0, PFD_MAIN_PLANE,0,0, 0, 0};int iPixelFormat = ::ChoosePixelFormat(this->_hDC, &pfd);if (iPixelFormat == 0) { return false; }if (DescribePixelFormat(this->_hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd) == FALSE) { return false; }if (::SetPixelFormat(this->_hDC, iPixelFormat, &pfd) == FALSE) { return false; }this->_hGLRC = wglCreateContext(this->_hDC);if (this->_hGLRC ==  0) { return false; }if(!wglMakeCurrent(this->_hDC, this->_hGLRC)) return false;but there is the following problem: after some time of inactivity the function wglMakeCurrent(_hDC, _hGLRC) failes; I must call it because I use two viewports; I tried to pin the user control but it didn't help; have you any ideas what can be improved here so that the call to wglMakeCurrent always succsseds?   