LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Kai on January 16, 2015, 21:21:49

Title: DefWindowProcW not called?
Post by: Kai on January 16, 2015, 21:21:49
Hey,

I was trying to use the Win32 API provided by LWJGL to create a Windows window. :)
So far I was successful in creating the window following the example in org.lwjgl.system.windows.WindowsTest.

Now, it does not seem that the window handles input messages through the registered DEF_WINDOW_PROC (DefWindowProcW from User32.dll), as the window stays unresponsive.

Is there any Win32 API function I need to call in order to let Windows process the window messages, that I wouldn't do otherwise in a native Win32 application?

Thanks!
Kai
Title: Re: DefWindowProcW not called?
Post by: Kai on January 16, 2015, 22:44:04
Ah, nevermind.

Just had a look at how GLFW does it with glfwPollEvents() and the windows-specific function _glfwPlatformPollEvents (https://github.com/glfw/glfw/blob/master/src/win32_window.c#L989).

And also the LWJGL 3 Demo WGLDemo (https://github.com/LWJGL/lwjgl3/blob/master/src/tests/org/lwjgl/demo/windows/WGLDemo.java#L118) contains an example of how to do this with the Win32 API provided by LWJGL 3. Great! :)