SFML community forums

Help => Window => Topic started by: DarkScythe on August 16, 2007, 02:37:34 am

Title: ReSize
Post by: DarkScythe on August 16, 2007, 02:37:34 am
Is there a way to maintain the size of the window on resize, i looked for a method to call on Resize event but couldnt find...
Title: ReSize
Post by: Alp on August 16, 2007, 03:36:20 am
It seems there's nothing to prevent the user from resizing the window like he wants.

However, you can inherit from sfRenderWindow (or sfWindow ?) and redefine the OnEvent virtual member function, trying to prevent pushing the resize event in the queue. However, as the event has been "done", i'm not sure this would be efficient.

Give a try, maybe :)
Title: ReSize
Post by: Laurent on August 16, 2007, 09:31:53 am
No, you can't interact with the low-level window ; nothing will prevent it from being resized. Why would you want this kind of feature ?

If you just want a window that can't be resized, it would be easier to play with the window style at creation time (still not doable directly, but can be easily added).
Title: ReSize
Post by: DarkScythe on August 16, 2007, 10:17:03 pm
ok, since we can give an external window handle as a parameter to the sfRenderWindow, i can handle it. Thanks for the replies...