SFML community forums

Help => Window => Topic started by: Yours3lf on July 16, 2011, 10:25:59 pm

Title: set fullscreen mode for an already created window
Post by: Yours3lf on July 16, 2011, 10:25:59 pm
Hi,

I'd like to set the fullscreen mode for an already created window without recreating it.

like so:

sf::Window the_window;

the_window.Create(sf::VideoMode(800, 600, 32), "", sf::Style::Default, sf::ContextSettings(0, 0, 0, 4, 1));

the_window.SetFullscreen(true);
or something like that.
and
the_window.SetFullscreen(false);
for making it windowed again.
How can I do that?

(I looked in the docs but I found nothing about it only recreating the window, on the forum I couldn't find any answer)

EDIT:
To add, how can I change the video mode in runtime without recreating the window?

Best regards,
Yours3!f
Title: set fullscreen mode for an already created window
Post by: Hiura on July 17, 2011, 12:02:29 am
You can't. You have to call Create.
Title: set fullscreen mode for an already created window
Post by: Yours3lf on July 17, 2011, 12:03:53 am
ok thank you.