# wglMakeCurrent failed in MakeCurrent()

**URL:** https://discourse.vtk.org/t/wglmakecurrent-failed-in-makecurrent/1516
**Category:** Support
**Created:** [August 8, 2019, 2:48am UTC](https://discourse.vtk.org/t/wglmakecurrent-failed-in-makecurrent/1516 "2019-08-08T02:48:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Wenye\_He](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wenye_he/32/418_2.png) [@Wenye\_He](https://discourse.vtk.org/u/Wenye_He)
#### Post date: [August 8, 2019, 2:48am UTC](https://discourse.vtk.org/t/wglmakecurrent-failed-in-makecurrent/1516/1 "2019-08-08T02:48:00Z")

</div>

I got an error,  
vtkWin32OpenGLRenderWindow (0000024A62E4C270): wglMakeCurrent failed in MakeCurrent(), error: The handle is invalid.  
What is this error and how to fix it?  
I create one mainwindow to display 3D model and one subwindow to display and edit 3D models.  
I get the error after I finish editing and show or unshow model in mainwindow.
