Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Disable Window resize  (Read 18530 times)

0 Members and 1 Guest are viewing this topic.

xzxvvxzx

  • Newbie
  • *
  • Posts: 7
    • View Profile
[SOLVED] Disable Window resize
« 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
« Last Edit: January 21, 2013, 01:14:26 am by xzxvvxzx »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Disable Window resize
« Reply #1 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.)

Whenever you post C++ code you should use the code=cpp tag. ;)
Also you should consider SFML 2.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

xzxvvxzx

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Disable Window resize
« Reply #2 on: January 21, 2013, 01:11:55 am »
Thank you, now it's working :)

kris0x00

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: [SOLVED] Disable Window resize
« Reply #3 on: June 02, 2013, 11:35:23 pm »
Thx ! it's working also for me.

 

anything