LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: QuorumAccessibility on September 21, 2017, 01:39:20

Title: [Solved] How to get Window handle from the window LWJGL creates?
Post by: QuorumAccessibility on September 21, 2017, 01:39:20
Can someone tell me where or how LWJGL creates the window handle for the main window on Windows? From what I can tell from the Hello World program on the Get Started page, GLFW is responsible for creating the window and that is passed around in Java to do things. However, I need to get access to the HWND down in C so that I can hook in COM interface code. I imagine at some point GLFW has to create the window through Windows API but from just looking through the source code its not clear to me.
Title: Re: How to get Window handle from the window LWJGL creates?
Post by: spasi on September 21, 2017, 06:34:29
See glfwGetWin32Window (https://javadoc.lwjgl.org/org/lwjgl/glfw/GLFWNativeWin32.html#glfwGetWin32Window-long-).
Title: Re: How to get Window handle from the window LWJGL creates?
Post by: QuorumAccessibility on September 21, 2017, 17:10:19
This is exactly what I was looking for. Thanks!