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