Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - masafi

Pages: [1]
1
Feature requests / Re: Add additional events polling
« on: March 11, 2020, 03:42:49 pm »
Ok, I figured out that I could just create new window, hide it and use only for WM_COPYDATA event handling.
It's not as convinient as just adding event handler, but works.
Nevertheless I think you should consider adding ability to handle additional events

2
Feature requests / Add additional events polling
« on: March 10, 2020, 04:21:01 pm »
I'm writing an application to debug another process, so I want to send debug data to draw from that process to sfml renderer. As both applications are windows only, I wanted to use WM_COPYDATA events to send data.
But I can't just add such event handler: the only way, that I see to do such thing is to create OS Window by myself, writing event handler for myself including all the events sfml can handle, and then pass a window to a sf::Window.
IMO this is very unconvinient, so I ask to do a way, that I could (may be os specific) add additional events polling.

I see 2 ways of doing that:
1) (probably preferred) add some os-specific handler in sf::Window and call it whenever your inner event handler works
Like:
LRESULT sf::WindowImpl32::pollEvent(UINT msg, WPARAM wParam, LPARAM lParam) {
  if (customHandler)
    customHandler(msg, wParam, lParam);
  // do usual stuff
}
2) Add ability to call your event handler from the outside, so even if I'm creating OS Window by myself, I could write something like
LRESULT CALLBACK HandleWindowEvents(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
  // do my stuff
  sf::Window::DefaultHandler(hwnd, msg, wParam, lParam);
}

May be there is another good way

Thanks

Pages: [1]