LWJGL Forum

Programming => Bug Reports / RFE => Topic started by: Simon Felix on December 29, 2011, 13:20:23

Title: [RFE] Constrain window resizing
Post by: Simon Felix on December 29, 2011, 13:20:23
Hey :)

I'd like to constrain the window resizing possible by the user. Things like minimum and maximum width/height would be nice. Also, I could really use an aspect-ratio lock - that way I just had to rescale the window contents.

Cheers,
Simon
Title: Re: [RFE] Constrain window resizing
Post by: Matzon on December 30, 2011, 08:40:45
hmm, not completely sure how that would be done... I assume we could just respond to the events on windows, but not sure about linux and mac. anyone?
Title: Re: [RFE] Constrain window resizing
Post by: Simon Felix on December 30, 2011, 21:40:12
Yup. It seems that WM_GETMINMAXINFO (http://msdn.microsoft.com/en-us/library/windows/desktop/ms632626(v=vs.85).aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/ms632626(v=vs.85).aspx)) and WM_SIZING (http://msdn.microsoft.com/en-us/library/windows/desktop/ms632647(v=VS.85).aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/ms632647(v=VS.85).aspx)) are the relevant events for Windows.

I'm mainly looking for a way to constrain the aspect ratio. People on the IRC argued yesterday that I should use a layout mechanism to handle various aspect ratios - but this is not a real solution in all cases. But maybe I'm the only one having this problem?