modal/modeless WTL dialog - ERROR - Object deleted before window was destroyed
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.misc only
 
Advanced search
POPULAR GROUPS

more...

comp.os ... programmer.misc Profile…
 Up
modal/modeless WTL dialog - ERROR - Object deleted before window was destroyed         


Author: ohadpr
Date: Apr 25, 2008 03:10

i have a WTL app with a CMessageLoop, there's a big modal dialog that
is the app.
at some point this modal dialog spawns a modeless dialog
(CAxDialogImpl) which lives
for a few seconds and then wants to destroy itself from an internal
WM_TIMER handler
in the modeless dialog.
no matter how i try to destroy this modeless dialog, i get this
assertion that m_hWnd
was not set to NULL.
both the modal and modeless dialogs are also COM objects. the modal
dialog is created
as a CComObjectStackEx and the modeless dialog which refuses to die
nicely is created
this way:
CComObject* test = NULL;
HRESULT hr = CComObject::CreateInstance(&test);
test->Create(0);
no comments