Hello Guest

[RFE] Constrain window resizing

  • 2 Replies
  • 3659 Views
[RFE] Constrain window resizing
« 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
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

*

Offline Matzon

  • *****
  • 2242
Re: [RFE] Constrain window resizing
« Reply #1 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?

Re: [RFE] Constrain window resizing
« Reply #2 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) and WM_SIZING (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?
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/