# glfwMakeContextCurrent MFC

**URL:** <https://discourse.glfw.org/t/glfwmakecontextcurrent-mfc/1876>\
**Category:** support\
**Created:** [June 18, 2021, 2:39pm UTC](https://discourse.glfw.org/t/glfwmakecontextcurrent-mfc/1876 "2021-06-18T14:39:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeVirnelson](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@MikeVirnelson](https://discourse.glfw.org/u/MikeVirnelson)\
**Post date:** [June 18, 2021, 2:39pm UTC](https://discourse.glfw.org/t/glfwmakecontextcurrent-mfc/1876/1 "2021-06-18T14:39:40Z")

</div>

Hello All,  
Im very new to openGL. I have watched many tutorials now and have some basic legacy openGL implementations of simple projects. However we are trying to update our functions to Modern GL. I have all my lib imported, glue, glwf all in the project and working. However my issue is a little tough. Im trying to little by little take our legacy code and update and have them both working together during development. Right now im stuck on getting the glfwMakeContextCurrent() to work with an MFC CView. if i do a GLwindow it opens up a new window and i need it to work with an existing view within the MFC project. Can anyone help or point me in a direction that makes sense.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [June 18, 2021, 4:22pm UTC](https://discourse.glfw.org/t/glfwmakecontextcurrent-mfc/1876/2 "2021-06-18T16:22:01Z")

</div>

Hi @MikeVirnelson welcome to the GLFW forums!

GLFW cannot currently create a context in an already created Window, but there is an open issue on implementing this feature along with a prototype implementation on Windows:

> <https://github.com/glfw/glfw/issues/25>
>
> It's really great that we can access native data from the OpenGL context such as… glfwGetWin32Window() and glfwGetWGLContext().
> 
> It would be nice if that part of the API would be extended to wrap a window that has been created outside of GLFW into GLFW structures for OpenGL context creation, or wrap a context that was created outside of GLFW into GLFW strucutres so that we can use GLFW functions on that context (such as glfwSwapInterval()) for instance.
> 
> An example of where this would useful is for screensaver development. Let's say an OpenGL cross-platform screensaver is to be developed. On Windows and Linux for instance, writing a screensaver starts by the OS giving you a window in a platform-specific way. It would be nice to be able to give that OS-specific window handle to GLFW so that from then on, we can use platform-independent GLFW calls to create the context, swap buffers, etc.

Cheers,

Doug
