SFML community forums
Help => Window => Topic started by: zill on October 19, 2008, 07:34:43 pm
-
Is it possible to use SFML to draw to a window in which I only have the window handle? For example, a function creates a window and returns the window handle. The window handle is the only bit of information I have about that window. Can I use that handle and draw directly to that window?
-
Of course ;)
sf::Window window(handle);
// Or
sf::Window window;
window.Create(handle);
But be careful, if the window is handled externally there might be some conflicts about events or painting. You'll probably have to setup some parameters (on your external window API's side, not SFML) to ensure the painting is done exclusively by SFML.
-
I figured there was a way to do this. I just didn't see that function in the documentation. Thank you.