Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
How to limit resizing of an MDI window
Suppose I have an MDI app, using MFC, and I would like to be able to limit the resizing of a child window. For instance, it should be possible to set a min. or max. size limit, and prevent the user from resizing beyond these limits (e.g. too small or too big).
My attempts to a solution basically involve the WM_SIZE event (there does not seem to be a WM_SIZING event for the View class??), but nothing seems to have any effect. Also, MSDN documentation states that, when you call the base-class implementation of OnSize (for which a line of code is automatically inserted when you add a function for this event using the classwizard), the parameters you supply are not used at all, but instead it uses the original parameters from the event...
Anyone have a hunch, and willing to share ani insights?
Thanks in advance,