用SendMessage来实现
如下
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);
}