CDialog::OnOk();
CDialog::OnCancel();
都是退出,內部調用了 EndDialog()。
如果是FrameWnd,使用 PostQuitMessage;
對話框也可以使用 PostQuitMessage