I have a created modeless dialog and placed a grid on top of this dialog(Grid completely overlaps on dialog).This will be shown when user clicks F2.Now when user clicks left mouse button outside the dialog i want to destroy this dialog. Can please somebody suggest how can i destroy the dialog?? (Just like Tool tip gets destroyed when clicked outside)
Asked
Active
Viewed 1,879 times
0
-
Or are you wondering how to detect when you lose focus? – Aidan Ryan Mar 15 '11 at 14:13
1 Answers
1
You have to store a pointer to the dialog in your main window. When you want to destroy it, call CDialog::DestroyWindow()
on it.

dwo
- 3,576
- 2
- 22
- 39