SFML community forums
Help => General => Topic started by: Martin379 on May 25, 2017, 01:25:56 am
-
Is there a way to do that?
I know how to do it in a win32 application.
Any help will be appreciated.
thanks!
-
Not directly (if at all). SFML abstracts the event handling and doesn't (yet) allow for custom interaction with it.
In the latest version the event you mentioned is used to track whrn a joystick is plugged in or unplugged.
There maybe a way to hook yourself into the event queue, by like using some WinAPI calls and using the native window handle, but you're basically on your own in that territory. ;)
-
It might be possible to intercept the message before it gets to the window proc function by using the SetWindowsHookEx function. Be prepared to spend a bit of time digging through MSDN to figure out how to get it working though.