Question: mfc how to close dialog?
Answer: The default handlers call the EndDialog member function to close the dialog window. You can also call EndDialog from your own code. For more information, see the EndDialog member function of class CDialog in the MFC Reference.