Luboš Doležel
2004-10-27
I need help with ATL/WTL - how to destroy a non-modal dialog when DestroyWindow is not a good funnction: it does NOT set m_hWnd to NULL, so I have asserts when the object is deleted.
Igor Tandetnik
2004-10-27
DestroyWindow indeed does not set m_hWnd to NULL. However, the dialog proc does set it to NULL when processing WM_NCDESTROY message. If you get assertions when the object is deleted, then it gets deleted prematurely.