用SendMessage来实现 如下void CGetcwndDlg::OnButton3() { // TODO: Add your control notification handler code here SendMessage(WM_SYSCOMMAND,SC_MAXIMIZE,0); } void CGetcwndDlg::OnButton4() { // TODO: Add your control notification handler code here SendMessage(WM_SYSCOMMAND,SC_MINIMIZE,0); } void CGetcwndDlg::OnButton5() { // TODO: Add your control notification handler code here SendMessage(WM_SYSCOMMAND,SC_RESTORE,0); }