I am new to VC++ window programming. I created a small window application using MFC. From the parent window, I can create an instance of Modeless dialog from a button "New Dialog" click. I would like to close all those Child Dialogs by clicking on another button "Close All". The following seems work fine, on Windows 7, although I am not sure if I am doing it the right way.