Finally the beast has been found and killed.
The problem was this:
I did this in PretranslateMessage nChar=VK_ESCAPE pMsg->wParam=MAKEWPARAM(nChar,nhChar); //AfxMessageBox(_T("Posting
quit message"); PostMessage(pMsg->message,pMsg->wParam,pMsg->lParam);
Replacing it with this solved the
strange but true.
Thanks to everybody who has replied to my posting.
> Which makes sense why you are hitting the ASSERT.
> What do you need the ASSERT for?
> (This posting is provided "AS IS" with no warranties, and confers no
> > Sorry misunderstood you're question.
> > The cdialog is gone when the assertion is given.
> > > Sounds like your handle is invalid.
> > > Has the window already been destroyed when you hit this ASSERT?
> > > --
> > > ~Demitri
> > > (This posting is provided "AS IS" with no warranties, and confers no
> > > rights.)
> > > > Hi,
> > > > I have an application that compiles for CE and PC using EVC 3.0 and
> > > > VC6.0.
> > > > But in debug both give this error when VK_RETURN of VK_ESCAPE is
> > > > pressed to close the the dialog.
> > > > ASSERT(::IsWindow(m_hWnd));
> > > > What could cause this problem?
> > > > I have tried tracing but without result :-(
> > > > Could reusing the same dialog ID for several windows (not at the same
> > > > time offcours) be the problem.
> > > > Regards
> > > > TheLaery