1.添加消息映射:
BEGIN_MESSAGE_MAP(CYdToolDlg, CDialog)
ON_WM_GETMINMAXINFO()
END_MESSAGE_MAP()
2.添加消息处理函数:
void CYdToolDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) { lpMMI->ptMinTrackSize.x = 640; //x宽度 lpMMI->ptMinTrackSize.y = 480; //y高度 CDialog::OnGetMinMaxInfo(lpMMI); }