Fix and reorganize CMainFrame::OnGetMinMaxInfo()