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 .
source share