Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个无模式对话框,并在此对话框顶部放置了一个网格(网格在对话框上完全重叠)。这将在用户单击 F2 时显示。现在当用户在对话框外单击鼠标左键时,我想销毁此对话框。请有人建议我如何销毁对话框?(就像在外部单击时工具提示被破坏一样)
您必须在主窗口中存储指向对话框的指针。当你想摧毁它时,召唤CDialog::DestroyWindow()它。
CDialog::DestroyWindow()