SFML community forums

Help => Window => Topic started by: xzxvvxzx on January 21, 2013, 12:54:03 am

Title: [SOLVED] Disable Window resize
Post by: xzxvvxzx on January 21, 2013, 12:54:03 am
Hello
I want to disable window resize in my program. All I could find was:

Code: [Select]
sf::RenderWindow Window(sf::VideoMode(800, 600, 32), "Window", sf::Style::Resize);
sf::Style::Resize removes close/minimize buttons from title bar, but I can still resize window. I am using SFML 1.6
Title: Re: Disable Window resize
Post by: eXpl0it3r on January 21, 2013, 01:05:05 am
Well you got that the wrong way around, with the style you define what you want and not what you don't want. ;)

sf::Style::Titlebar | sf::Style::Close
(It's also explained in the official tutorial (http://www.sfml-dev.org/tutorials/1.6/window-window.php).)

Whenever you post C++ code you should use the code=cpp tag. ;)
Also you should consider SFML 2 (https://github.com/SFML/SFML/wiki/FAQ#wiki-grl-version).
Title: Re: Disable Window resize
Post by: xzxvvxzx on January 21, 2013, 01:11:55 am
Thank you, now it's working :)
Title: Re: [SOLVED] Disable Window resize
Post by: kris0x00 on June 02, 2013, 11:35:23 pm
Thx ! it's working also for me.