Can I block the width or height of the MFC dialog while resizing?

Is there a way to block the size of the dialog box in one direction (limit only width or only height) in MFC?

+4
source share
1 answer

You need to override OnGetMinMaxInfo . In OnInitDialog, you can capture the current height and then use it for both minimum and maximum height. First call __super::OnGetMinMaxInfo , and then change only the height elements. Note that the window may not exist for the first two times when OnGetMinMaxInfo is called.

Here's a detailed article about GetMinMaxInfo .

+6
source

Source: https://habr.com/ru/post/1343167/


All Articles