# How to get the handle of a Window in GLFW

**URL:** <https://discourse.glfw.org/t/how-to-get-the-handle-of-a-window-in-glfw/172>\
**Category:** support\
**Created:** [August 13, 2015, 9:25pm UTC](https://discourse.glfw.org/t/how-to-get-the-handle-of-a-window-in-glfw/172 "2015-08-13T21:25:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [August 13, 2015, 9:25pm UTC](https://discourse.glfw.org/t/how-to-get-the-handle-of-a-window-in-glfw/172/1 "2015-08-13T21:25:48Z")

</div>

**[kanesoban](https://sourceforge.net/u/kanesoban/)** wrote on [Thursday, August 13, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/c35acce6/#b260):

I am using cocos2d and by extension GLFW for a game project. I need to get the handle of the current window, but i cannot find anything in the API that shows how this can be done.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [August 13, 2015, 9:48pm UTC](https://discourse.glfw.org/t/how-to-get-the-handle-of-a-window-in-glfw/172/2 "2015-08-13T21:48:16Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Thursday, August 13, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/c35acce6/#f013):

The handle?

---

<div class="post-metadata">

**Author:** ![clown358](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@clown358](https://discourse.glfw.org/u/clown358)\
**Post date:** [April 11, 2016, 3:55am UTC](https://discourse.glfw.org/t/how-to-get-the-handle-of-a-window-in-glfw/172/3 "2016-04-11T03:55:28Z")

</div>

You have to include the glfw3native.h header and use the glfwGetWin32Window (GLFWwindow \*window) function.  
[http://www.glfw.org/docs/latest/glfw3native\_8h.html](http://www.glfw.org/docs/latest/glfw3native_8h.html)
