The Compiler is generating a warning regarding the destruction of a non-modal window. The window itself pops up while the application is processing a task that could be lengthy. During the processing, it increments a Progress Bar on the non-modal Dialog Box, then a call to DestroyWindow() closes the window. When the application launches and I view the Debug notes in Developer Studio, I see the following warning:
Warning: calling DestroyWindow in CDialog::~CDialog --
OnDestroy or PostNcDestroy in derived class will not be called.
I have tried destroying the window in the Destructor of the Class that governs the Dialog Box, but the warning was still generated. Any idea why this is, and what I can do to prevent it?