Well.. now it's possible to access the window handle from a sf::Window, but probably you'll want to be able to do sf::RenderWindow->GetWindowHandle() so lets do our last hack:
( sf::RenderWindow uses private inheritance from sf::Window so it will not be possible to just call GetWindowHandle() from the base class ).
FILE: src\SFML\Graphics\RenderWindow.hpp
public:
WindowHandle GetWindowHandle(void);
FILE: \src\SFML\Graphics\RenderWindow.cpp
WindowHandle RenderWindow::GetWindowHandle( void ) const {
return Window::GetWindowHandle();
}
That's it! now recompile sfml, if you're on Linux or Mac you must add the GetWindowHandle() method to the other window creation methods to get this code to work.
/ iiingo
Just because this code help me a lot to make the port to SFML ... I think it's quite obvious but you need to add the
const keyword to the function in RenderWindow.hpp
FILE: src\SFML\Graphics\RenderWindow.hpp
public:
WindowHandle GetWindowHandle(void) const;