Destroy modeless dialog box

Destroy modeless dialog box
          When you implement a modeless dialog box, always override the OnCancel member function and call DestroyWindow from within   it. Don’t call the base class CDialog::OnCancel, because it calls EndDialog, which will make the dialog box invisible but will not destroy it. 
         You should also override PostNcDestroy for modeless dialog boxes in order to delete this, since modeless dialog boxes are usually allocated with new. Modal dialog boxes are usually constructed on the frame and do not need PostNcDestroy cleanup.

你可能感兴趣的:(Destroy modeless dialog box)